Class Hmac

Summary

Fully Qualified Name: Zend\Crypt\Hmac

Description

PHP implementation of the RFC 2104 Hash based Message Authentication Code

Methods

Name Description Defined By
clearLastAlgorithmCache() Clear the cache of last algorithm supported Hmac
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. Hmac
getOutputSize() Get the output size according to the hash algorithm and the output format Hmac
getSupportedAlgorithms() Get the supported algorithm Hmac
isSupported() Is the hash algorithm supported? Hmac

Method Details

clearLastAlgorithmCache()

Clear the cache of last algorithm supported

Returns:

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.

Parameter Name Type Description
$key string
$hash string
$data string
$output bool

Returns: string

getOutputSize()

Get the output size according to the hash algorithm and the output format

Parameter Name Type Description
$hash string
$output bool

Returns: int

getSupportedAlgorithms()

Get the supported algorithm

Returns: array

isSupported()

Is the hash algorithm supported?

Parameter Name Type Description
$algorithm string

Returns: bool

Top