Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
ネイティブ
Skip to main content
Represents an HMAC (Hash-based Message Authentication Code) context. This class provides functionality for creating and verifying HMAC signatures.

Extends

  • BaseCryptoClass

Constructors

new HmacContext()

new HmacContext(): HmacContext

Returns

HmacContext

Methods

sign()

sign(message: ArrayBuffer): Promise<ArrayBuffer>
Sign a message using the HMAC context.

Parameters

message
ArrayBuffer The message to be signed.

Throws

Returns

Promise<ArrayBuffer> Promise<ArrayBuffer> A promise that resolves to the HMAC signature as an ArrayBuffer.

verify()

verify(message: ArrayBuffer, tag: ArrayBuffer): Promise<boolean>
Verify the authenticity of a message using the HMAC context.

Parameters

message
ArrayBuffer The original message to verify.
tag
ArrayBuffer The HMAC tag (signature) to verify against the message.

Throws

Returns

Promise<boolean> Promise<boolean> A promise that resolves to true if the message is authentic, false otherwise.
最終更新日 2026年8月25日