codecamp

PHP8 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

根据当前哈希值和 确定是否重新哈希密码。opslimitmemlimit

参数 

password

密码哈希

opslimit

配置的 opslimit;见sodium_crypto_pwhash_str()

memlimit

配置的 memlimit;见sodium_crypto_pwhash_str()

返回值 

如果提供的 memlimit/opslimit 与哈希中存储的内容不匹配,则返回 true。 如果匹配,则返回 false。


PHP8 sodium_crypto_pwhash_scryptsalsa208sha256
PHP8 sodium_crypto_pwhash_str_verify
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定