321. Class

321.1. Zend\Crypt\Hmac

PHP implementation of the RFC 2104 Hash based Message Authentication Code

321.1.1. Methods

321.1.1.1. compute

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.

Parameters:
  • string
  • string
  • string
  • bool
Throws ExceptionInvalidArgumentException:
 
Return type:

string

321.1.1.2. getOutputSize

getOutputSize()

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

Parameters:
  • string
  • bool
Return type:

integer

321.1.1.3. getSupportedAlgorithms

getSupportedAlgorithms()

Get the supported algorithm

Return type:array

321.1.1.4. isSupported

isSupported()

Is the hash algorithm supported?

Parameters:string
Return type:bool

321.1.1.5. clearLastAlgorithmCache

clearLastAlgorithmCache()

Clear the cache of last algorithm supported

321.1.2. Constants

321.1.2.1. OUTPUT_STRING

321.1.2.2. OUTPUT_BINARY