Skip to content
Snippets Groups Projects
Commit d48e188d authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Be explicit when checking if there's a salt defined or not.

parent 1bb8ea6d
No related branches found
No related tags found
No related merge requests found
......@@ -284,7 +284,7 @@ class Crypto
}
// hash w/ salt
if (!$salt) { // no salt provided, generate one
if ($salt === null) { // no salt provided, generate one
// default 8 byte salt, but 4 byte for LDAP SHA1 hashes
$bytes = ($algorithm == 'SSHA1') ? 4 : 8;
$salt = openssl_random_pseudo_bytes($bytes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment