Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

Michiel Thalen, Thalent
8 years ago
As Michael uggests we should take care not to compare the hash using == (or ===). Since PHP version 5.6 we can now use hash_equals().

So the example will be:

<?php
if (hash_equals($hashed_expected, $hashed_value) ) {
echo
"hashes match!";
}
?>

<< Back to user notes page

To Top