array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.sodium-crypto-pwhash-str-verify.php', 1 => 'sodium_crypto_pwhash_str_verify', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium 関数', ), 'prev' => array ( 0 => 'function.sodium-crypto-pwhash-str-needs-rehash.php', 1 => 'sodium_crypto_pwhash_str_needs_rehash', ), 'next' => array ( 0 => 'function.sodium-crypto-pwhash-str.php', 1 => 'sodium_crypto_pwhash_str', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/sodium/functions/sodium-crypto-pwhash-str-verify.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_pwhash_str_verify — パスワードが、ハッシュ値と一致するかを調べる
sodium_crypto_pwhash_str() を使って生成されたパスワードハッシュが、 指定されたプレーンテキストのパスワードとマッチするかを調べます。 この関数と似た password_verify() に指定する同じ引数と、順番が逆であることに注意して下さい。
hash
password_hash() が作ったハッシュ。
password
ユーザーのパスワード。
注意:
ハッシュ値は Argon2ID アルゴリズムを使って計算されます。 このアルゴリズムは、GPU に対する攻撃と サイドチャネル攻撃の両方に対する耐性を提供します。