sodium_crypto_pwhash_str_needs_rehash

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_pwhash_str_needs_rehashDetermina se uma senha deve ou não ter o hash refeito

Descrição

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

Determina se uma senha deve ou não ter o hash refeito, com base no opslimit e memlimit do hash atual.

Parâmetros

password

Hash de senha

opslimit

Opslimit configurado; veja sodium_crypto_pwhash_str()

memlimit

Memlimit configurado; veja sodium_crypto_pwhash_str()

Valor Retornado

Retorna true se o memlimit/opslimit fornecido não corresponder ao que está armazenado no hash. Retorna false se corresponderem.