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 contexts for symmetric cryptographic operations.

Extends

  • BaseCryptoClass

Extended by

Accessors

key

Set Signature

set key(key): void Specify the symmetric key to be used for encryption or decryption.
Remarks
This parameter is mandatory.
Parameters
key
SymmetricKey The symmetric key to use.
Returns
void

Methods

buildDecryptionContext()

buildDecryptionContext(): DecryptionContext Build a context that can be used for decryption operations.

Returns

DecryptionContext A decryption context.

Throws

AccessDeniedError If the key lacks the KeyPurpose.DECRYPT purpose.

Throws

InvalidArgumentError If any mandatory parameter is missing or the key is invalid.

buildEncryptionContext()

buildEncryptionContext(): EncryptionContext Build a context that can be used for encryption operations.

Returns

EncryptionContext An encryption context.

Throws

AccessDeniedError If the key lacks the KeyPurpose.ENCRYPT purpose.

Throws

InvalidArgumentError If any mandatory parameter is missing or the key is invalid.
Last modified on October 2, 2025