WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Compat::crypto_pwhash_str_verify() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Compat{}

No Hooks.




$result = ParagonIE_Sodium_Compat::crypto_pwhash_str_verify( $passwd, $hash );
$passwd(string) (required)
$hash(string) (required)

Code of ParagonIE_Sodium_Compat::crypto_pwhash_str_verify() WP 5.8.3

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'