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
Native
Skip to main content

Interface IMessageAuthenticationCode

interface IMessageAuthenticationCode
Extends com.amazon.apmf.IStandard Interface for Message Authentication Code (MAC) algorithms. MACs provide data integrity and authenticity verification through cryptographic authentication tags.

Methods

getName()

string getName()
Get the name of the MAC algorithm.

Returns

string The name of the algorithm.

getTagLength()

i32 getTagLength()
Get the length of the authentication tag produced by this MAC algorithm.

Returns

i32 The tag length in bytes.

getHashAlgorithm()

IDigestAlgorithm* getHashAlgorithm()
Get the underlying hash algorithm for HMAC variants. Returns null for non-HMAC MAC algorithms.

Returns

IDigestAlgorithm* The underlying digest algorithm, or null if not applicable.

Constants

HMAC_SHA256

string = "HmacSha256"
Constant representing HMAC with SHA-256. HMAC-SHA256 provides message authentication using SHA-256 hash function.

HMAC_SHA384

string = "HmacSha384"
Constant representing HMAC with SHA-384. HMAC-SHA384 provides message authentication using SHA-384 hash function.

HMAC_SHA512

string = "HmacSha512"
Constant representing HMAC with SHA-512. HMAC-SHA512 provides message authentication using SHA-512 hash function.
Last modified on October 29, 2026