1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

Replace mcrypt_create_iv with random_bytes

`mcrypt_create_iv()` was deprecated in PHP 7.1.0.
This commit is contained in:
RalphORama 2017-10-24 16:16:25 -04:00 committed by GitHub
parent 7477215eee
commit 67b1565ef8

View File

@ -70,7 +70,7 @@ function test_password($password, $salt, $test) {
function generate_salt() { function generate_salt() {
// 128 bits of entropy // 128 bits of entropy
return strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.'); return strtr(base64_encode(random_bytes(16)), '+', '.');
} }
function login($username, $password) { function login($username, $password) {