sodium_crypto_pwhash_str_needs_rehash

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_pwhash_str_needs_rehashパスワードを再計算する必要があるかを判定する

説明

sodium_crypto_pwhash_str_needs_rehash(string$password, int$opslimit, int$memlimit): bool

現在の opslimit 値と memlimit 値から、 パスワードを再計算する必要があるかを判定します。

パラメータ

password

パスワードハッシュ

opslimit

設定済みの opslimit。 sodium_crypto_pwhash_str() を参照ください。

memlimit

設定済みの memlimit。 sodium_crypto_pwhash_str() を参照ください。

戻り値

設定された memlimit/opslimit が、 保存されたハッシュ値にマッチしない場合、true を返します。 マッチする場合、false を返します。

To Top