public static function ParagonIE_Sodium_Compat::crypto_pwhash_str_verify in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
@psalm-suppress MixedArgument
Parameters
string $passwd:
string $hash:
Return value
bool
Throws
SodiumException
TypeError
2 calls to ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
- php72compat.php in vendor/
paragonie/ sodium_compat/ lib/ php72compat.php - sodium_compat.php in vendor/
paragonie/ sodium_compat/ lib/ sodium_compat.php
File
- vendor/
paragonie/ sodium_compat/ src/ Compat.php, line 2016
Class
Code
public static function crypto_pwhash_str_verify($passwd, $hash) {
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1);
ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 2);
if (self::useNewSodiumAPI()) {
return (bool) sodium_crypto_pwhash_str_verify($passwd, $hash);
}
if (self::use_fallback('crypto_pwhash_str_verify')) {
return (bool) call_user_func('\\Sodium\\crypto_pwhash_str_verify', $passwd, $hash);
}
// This is the best we can do.
throw new SodiumException('This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP');
}