HmacContextBuilder
Provides support for building HMAC (Hash-based Message Authentication Code) contexts.
Extends
BaseCryptoClass
Accessors
digestAlgorithm
Set Signature
set digestAlgorithm(
algorithm
):void
Specify the digest algorithm to be used in the HMAC operation.
Remarks
This parameter is mandatory.
Throws
InvalidArgumentError If the algorithm is invalid.
Parameters
algorithm
The digest algorithm to use.
Returns
void
key
Set Signature
set key(
key
):void
Specify the key to be used in the HMAC operation.
Remarks
This parameter is mandatory.
Parameters
key
The key to use.
Returns
void
Methods
build()
build():
HmacContext
Build a context that can be used for performing HMAC operations, based on the configured parameters.
Returns
The built HMAC context.
Throws
InvalidArgumentError If any mandatory parameter is missing or invalid.
Last updated: Sep 30, 2025