(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_pwhash_str_needs_rehash — 判斷是否需要重新雜湊密碼
$password
$opslimit
$memlimit
根據目前的雜湊值、opslimit 和 memlimit,判斷是否需要重新雜湊密碼。
opslimit
memlimit
password
密碼雜湊值
已設定的 opslimit;詳見 sodium_crypto_pwhash_str()
已設定的 memlimit;詳見 sodium_crypto_pwhash_str()
如果提供的 memlimit/opslimit 與儲存在雜湊值中的不相符,則回傳 true。如果相符,則回傳 false。
true
false