(PHP 5 >= 5.5.0)
password_needs_rehash — Checks if the given hash matches the given options
$hash
, integer $algo
[, array $options
] )This function checks to see if the supplied hash implements the algorithm and options provided. If not, it is assumed that the hash needs to be rehashed.
hashUn hash creato da password_hash().
algoUna costante per l'algoritmo della password che stabilisce l'algoritmo da utilizzare quando si effettua l'hashing della password.
optionsUn array associativo che contiene opzioni. Attualmente, sono accettate due opzioni: salt, per fornire un sale da usare al momento dell'hashing della password, e cost, che stabilisce il costo algoritmico che deve essere utilizzato. Degli esempi di questi valori si trovano alla pagina crypt().
Returns TRUE if the hash should be rehashed to match the given
algo and options, or FALSE
otherwise.