From cab2ea1004f27c7f280f747633ec6335919a1b5a Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 4 Feb 2020 17:40:43 +0900 Subject: [PATCH] Update security.php --- system/security.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/system/security.php b/system/security.php index e90a99e..b859374 100644 --- a/system/security.php +++ b/system/security.php @@ -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 = "";