Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
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 modified on October 2, 2025