ParagonIE_Sodium_Core_Util::verify_32() public WP 1.0
Compare a 32-character byte string in constant time.
{} It's a method of the class: ParagonIE_Sodium_Core_Util{}
No Hooks.
Return
true|false
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Core_Util::verify_32( $a, $b );
- $a(string) (required)
- -
- $b(string) (required)
- -
Code of ParagonIE_Sodium_Core_Util::verify_32() ParagonIE Sodium Core Util::verify 32 WP 5.7
public static function verify_32($a, $b)
{
/* Type checks: */
if (!is_string($a)) {
throw new TypeError('String expected');
}
if (!is_string($b)) {
throw new TypeError('String expected');
}
return self::hashEquals(
self::substr($a, 0, 32),
self::substr($b, 0, 32)
);
}