Zend\Crypt\Hmac
PHP implementation of the RFC 2104 Hash based Message Authentication Code
Synopsis
class Hmac
{
- // constants
- const OUTPUT_STRING = ;
- const OUTPUT_BINARY = ;
- // members
- protected string|null $lastAlgorithmSupported;
- // methods
- public static string compute()
- public static int getOutputSize()
- public static array getSupportedAlgorithms()
- public static bool isSupported()
- public static void clearLastAlgorithmCache()
Constants
Name | Value |
---|---|
OUTPUT_STRING | |
OUTPUT_BINARY |
Members
protected
- $lastAlgorithmSupported
—
Zend\Crypt\string|null
Last algorithm supported
Methods
public
- clearLastAlgorithmCache() — Clear the cache of last algorithm supported
- compute() — 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.
- getOutputSize() — Get the output size according to the hash algorithm and the output format
- getSupportedAlgorithms() — Get the supported algorithm
- isSupported() — Is the hash algorithm supported?