Class HashUtils
Contains hashing utilities
Methods summary
-
public static
hexToBin ( string $hash )
Converts a hash in hex form to binary form
-
public static
binToHex ( string $hash )
Converts a hash in binary form to hex form
-
public static
validateAlgorithm ( string $algorithm )
Checks if the algorithm specified exists and throws an exception if it does not
Methods detail
Converts a hash in hex form to binary form
Parameters
- $hash
string
$hash Hash in hex form
Returns
string
Hash in binary form
Converts a hash in binary form to hex form
Parameters
- $hash
string
$hash Hash in binary form
Returns
string
Hash in hex form
Checks if the algorithm specified exists and throws an exception if it does not
Parameters
- $algorithm
string
$algorithm Name of the algorithm to validate
Returns
boolean