Update security.php

This commit is contained in:
Namhyeon Go 2018-09-24 03:03:27 +09:00 committed by GitHub
parent 03c19b86db
commit 3fad6e98c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,6 +187,13 @@ if(!function_exists("get_hashed_text")) {
case "crypt":
$hashed_text = crypt($text);
break;
case "crc32":
if(!array_key_equals("decimal", $options, true)) {
$hashed_text = str_pad(dechex(crc32($text)), 8, '0', STR_PAD_LEFT);
} else {
$hashed_text = crc32($text);
}
break;
case "base64":
if(!array_key_equals("decode", $options, true)) {
$hashed_text = base64_encode($text);