Méthode | Description | |
---|---|---|
equal ( string $known, string $given ) : boolean | Compares two strings in constant time. Strings are hashed before comparison so information is not leaked when strings are not of equal length. | |
hashSize ( string $algo ) : integer | Determine the length of the output of a given hash algorithm in bytes. | |
strlen ( string $string ) : integer | Returns the number of bytes in a string. | |
substr ( string $string, integer $start, integer $length = null ) : string | Returns part of a string. |
Méthode | Description | |
---|---|---|
strcmp ( string $knownHash, string $givenHash ) : boolean | Private constant-time strcmp method to use when hash_equals is unavailable. |