PHP implementation of the RFC 2104 Hash based Message Authentication Code.
More...
|
static | compute ($key, $hash, $data, $output=self::OUTPUT_STRING) |
| Performs a HMAC computation given relevant details such as Key, Hashing algorithm, the data to compute MAC of, and an output format of String, or Binary.
|
|
static | getOutputSize ($hash, $output=self::OUTPUT_STRING) |
| Get the output size according to the hash algorithm and the output format.
|
|
static | getSupportedAlgorithms () |
| Get the supported algorithm.
|
|
static | isSupported ($algorithm) |
| Is the hash algorithm supported?
|
|
static | clearLastAlgorithmCache () |
| Clear the cache of last algorithm supported.
|
|
PHP implementation of the RFC 2104 Hash based Message Authentication Code.
static clearLastAlgorithmCache |
( |
| ) |
|
|
static |
Clear the cache of last algorithm supported.
static compute |
( |
|
$key, |
|
|
|
$hash, |
|
|
|
$data, |
|
|
|
$output = self::OUTPUT_STRING |
|
) |
| |
|
static |
Performs a HMAC computation given relevant details such as Key, Hashing algorithm, the data to compute MAC of, and an output format of String, or Binary.
- Parameters
-
string | $key | |
string | $hash | |
string | $data | |
bool | $output | |
- Exceptions
-
Exception\InvalidArgumentException | |
- Returns
- string
static getOutputSize |
( |
|
$hash, |
|
|
|
$output = self::OUTPUT_STRING |
|
) |
| |
|
static |
Get the output size according to the hash algorithm and the output format.
- Parameters
-
- Returns
- int
static getSupportedAlgorithms |
( |
| ) |
|
|
static |
Get the supported algorithm.
- Returns
- array
static isSupported |
( |
|
$algorithm | ) |
|
|
static |
Is the hash algorithm supported?
- Parameters
-
- Returns
- bool
const OUTPUT_BINARY = true |
const OUTPUT_STRING = false |