PHP » GoLang |
login |
register |
about
|
hash_equals(PHP 5 >= 5.6.0, PHP 7) hash_equals — Timing attack safe string comparison Description
bool hash_equals
( string
$known_string
, string $user_string
)Compares two strings using the same time whether they're equal or not. This function should be used to mitigate timing attacks; for instance, when testing crypt() password hashes. Parameters
Return Values
Returns Errors/Exceptions
Emits an Examples
Example #1 hash_equals() example
<?php The above example will output: bool(true) bool(false) Notes
|
more
Recently updated
more
Most requested
|