public static function ParagonIE_Sodium_Core_Util::verify_32 in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Core/Util.php \ParagonIE_Sodium_Core_Util::verify_32()
Compare a 32-character byte string in constant time.
@internal You should not use this directly from another application
Parameters
string $a:
string $b:
Return value
bool
Throws
SodiumException
TypeError
6 calls to ParagonIE_Sodium_Core_Util::verify_32()
- ParagonIE_Sodium_Core32_Curve25519::fe_isnonzero in vendor/
paragonie/ sodium_compat/ src/ Core32/ Curve25519.php - Returns 0 if this field element results in all NUL bytes.
- ParagonIE_Sodium_Core32_Ed25519::verify_detached in vendor/
paragonie/ sodium_compat/ src/ Core32/ Ed25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core_Curve25519::fe_isnonzero in vendor/
paragonie/ sodium_compat/ src/ Core/ Curve25519.php - Returns 0 if this field element results in all NUL bytes.
- ParagonIE_Sodium_Core_Ed25519::verify_detached in vendor/
paragonie/ sodium_compat/ src/ Core/ Ed25519.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_File::verify in vendor/
paragonie/ sodium_compat/ src/ File.php - Verify a file (rather than a string). Uses less memory than ParagonIE_Sodium_Compat::crypto_sign_verify_detached(), but produces the same result.
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ Util.php, line 863
Class
- ParagonIE_Sodium_Core_Util
- Class ParagonIE_Sodium_Core_Util
Code
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));
}