mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 16:33:48 +01:00
LSaddon::accesslog: fix hashing SSHA512 password (in hashPasswordForLogs())
This commit is contained in:
parent
48e5d45d32
commit
3bbf770e33
1 changed files with 1 additions and 1 deletions
|
@ -353,7 +353,7 @@ function hashPasswordForLogs($password) {
|
|||
if(defined('MHASH_SHA512') && function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
|
||||
mt_srand( (double) microtime() * 1000000 );
|
||||
$salt = mhash_keygen_s2k(MHASH_SHA512, $password, substr( pack( "h*", md5( mt_rand() ) ), 0, 8 ), 4 );
|
||||
return "{SSHA512}".base64_encode(mhash($mhash_type, $password.$salt).$salt);
|
||||
return "{SSHA512}".base64_encode(mhash(MHASH_SHA512, $password.$salt).$salt);
|
||||
}
|
||||
return '[not logged]';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue