as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

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

DigestAlgorithm

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

SymmetricKey

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

HmacContext

The built HMAC context.

Throws

InvalidArgumentError If any mandatory parameter is missing or invalid.


Last updated: Sep 30, 2025