as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

SymmetricKey

Represents a symmetric key used for cryptographic operations. Symmetric keys are typically generated using a SymmetricKeyBuilder. This class also provides methods to export and check the properties of symmetric keys.

Extends

  • BaseCryptoClass

Accessors

exportable

Get Signature

get exportable(): boolean

Check whether the key is exportable or not.

Returns

boolean

true if the key is exportable, false otherwise.


purposes

Get Signature

get purposes(): KeyPurpose[]

Get the purposes enabled for this key.

Returns

KeyPurpose[]

An array with the purposes enabled for this key.

Methods

exportRaw()

exportRaw(): Promise<ArrayBuffer>

Export the symmetric key as raw bytes. This method should only be called on keys that are marked as exportable.

Returns

Promise<ArrayBuffer>

A promise that resolves to the raw key bytes.

Throws

AccessDeniedError If the key is not exportable.


hasPurpose()

hasPurpose(purpose): boolean

Check if a particular purpose is enabled for this key.

Parameters

purpose

KeyPurpose

A key purpose to check.

Returns

boolean

true if the purpose is enabled for this key, false otherwise.

Throws

InvalidArgumentError If the argument is not a valid purpose.


Last updated: Oct 02, 2025