the choice between 2 hashing algos was preventing maximum portability (if the target platform lacked the optional algorithm, while the install platform had it you couldn't login anymore): I've chosen salted md5, which is probably easier to find (well, I tested on 2 servers and they both lacked the other one: I was MAD): the salt is however very long, and once created you can edit it and reinstall again to make it even stronger
This commit is contained in:
parent
987eb106a4
commit
f5bd65f529
@ -354,12 +354,7 @@ endif;
|
||||
if ( !function_exists('wp_hash') ) :
|
||||
function wp_hash($data) {
|
||||
$salt = wp_salt();
|
||||
|
||||
if ( function_exists('hash_hmac') ) {
|
||||
return hash_hmac('md5', $data, $salt);
|
||||
} else {
|
||||
return md5($data . $salt);
|
||||
}
|
||||
return md5($data . $salt);
|
||||
}
|
||||
endif;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user