public static function ParagonIE_Sodium_Core_Util::verify_16 in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core/Util.php \ParagonIE_Sodium_Core_Util::verify_16()
Compare a 16-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
5 calls to ParagonIE_Sodium_Core_Util::verify_16()
- ParagonIE_Sodium_Core32_Poly1305::onetimeauth_verify in vendor/
paragonie/ sodium_compat/ src/ Core32/ Poly1305.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Core_Poly1305::onetimeauth_verify in vendor/
paragonie/ sodium_compat/ src/ Core/ Poly1305.php - @internal You should not use this directly from another application
- ParagonIE_Sodium_Crypto::aead_chacha20poly1305_decrypt in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - AEAD Decryption with ChaCha20-Poly1305
- ParagonIE_Sodium_Crypto::aead_chacha20poly1305_ietf_decrypt in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)
- ParagonIE_Sodium_File::onetimeauth_verify in vendor/
paragonie/ sodium_compat/ src/ File.php
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ Util.php, line 837
Class
- ParagonIE_Sodium_Core_Util
- Class ParagonIE_Sodium_Core_Util
Code
public static function verify_16($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, 16), self::substr($b, 0, 16));
}