php deprecated 사용되는 코드 수정
This commit is contained in:
1 parent
87bb2f1d8a
commit
799aefada2
2 files changed
+2
-2
No files matched your search
@@ -46,7 +46,7 @@ function create_hash($password, $force_compat = false)
|
||||
{
|
||||
// Generate the salt.
|
||||
|
||||
if (function_exists('mcrypt_create_iv')) {
|
||||
if (function_exists('mcrypt_create_iv') && version_compare( PHP_VERSION, '7.2' , '<' ) ) {
|
||||
$salt = base64_encode(mcrypt_create_iv(PBKDF2_COMPAT_SALT_BYTES, MCRYPT_DEV_URANDOM));
|
||||
} elseif (@file_exists('/dev/urandom') && $fp = @fopen('/dev/urandom', 'r')) {
|
||||
$salt = base64_encode(fread($fp, PBKDF2_COMPAT_SALT_BYTES));
|
||||
|
||||
Reference in new issue
Block a user