PHP Conference Japan 2024

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