mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 18:25:13 +00:00
RSA: use hash_equals if available
This commit is contained in:
parent
f111bf94b6
commit
b5b763b3f2
@ -2301,6 +2301,10 @@ class Crypt_RSA
|
||||
*/
|
||||
function _equals($x, $y)
|
||||
{
|
||||
if (function_exists('hash_equals')) {
|
||||
return hash_equals($x, $y);
|
||||
}
|
||||
|
||||
if (strlen($x) != strlen($y)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user