Update security.php

This commit is contained in:
Namhyeon Go 2020-02-04 17:40:43 +09:00 committed by GitHub
parent ce7789b9e7
commit cab2ea1004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,11 +253,11 @@ if(!check_function_exists("get_hashed_text")) {
}
if(!check_function_exists("get_compressed_text")) {
function get_compressed_text($text, $algo="deflate", $options=array()) {
function get_compressed_text($text, $algo="gzip", $options=array()) {
$_text = "";
switch($algo) {
case "deflate":
case "gzip":
$_text = get_hashed_text(gzdeflate($text), "base64");
default:
$_text = $text;
@ -267,6 +267,21 @@ if(!check_function_exists("get_compressed_text")) {
}
}
if(!check_function_exists("get_uncompressed_text")) {
function get_uncompressed_text($text, $algo="gzip", $options=array()) {
$_text = "";
switch($algo) {
case "gzip":
$_text = gzinflate(base64_decode($text));
default:
$_text = $text;
}
return $_text;
}
}
if(!check_function_exists("get_salt")) {
function get_salt() {
$salt = "";