2024 日本 PHP 研討會

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(字串 $password, 整數 $opslimit, 整數 $memlimit): 布林值

根據目前的雜湊值、opslimitmemlimit,判斷是否需要重新雜湊密碼。

參數

password

密碼雜湊值

opslimit

已設定的 opslimit;詳見 sodium_crypto_pwhash_str()

memlimit

已設定的 memlimit;詳見 sodium_crypto_pwhash_str()

回傳值

如果提供的 memlimit/opslimit 與儲存在雜湊值中的不相符,則回傳 true。如果相符,則回傳 false

新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top