Definition at line 9 of file HashInterface.php.
fpoirotte\Cryptal\Implementers\HashInterface::__construct |
( |
HashEnum |
$algorithm | ) |
|
static fpoirotte\Cryptal\Implementers\HashInterface::hash |
( |
HashEnum |
$algorithm, |
|
|
|
$data, |
|
|
|
$raw = false |
|
) |
| |
|
static |
All-in-one function to quickly compute the hash/message digest for a string of text.
- Parameters
-
HashEnum | $algorithm | Algorithm to use to produce the hash/message digest. |
string | $data | Data to hash. |
bool | $raw | (optional) Whether the result should be returned in raw form (true ) or using its hexadecimal representation (false ). Defaults to false . |
- Return values
-
string | Hash/message digest for the given data. |
Implemented in fpoirotte\Cryptal\Implementers\AbstractHash.
The documentation for this interface was generated from the following file: