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

Constructors

new SubtleCrypto()

new SubtleCrypto(internalWebCrypto): SubtleCrypto

Parameters

internalWebCrypto
InternalWebCrypto

Returns

SubtleCrypto

Methods

decrypt()

decrypt(algorithm, key, data): Promise<ArrayBuffer>

Parameters

algorithm
EncryptionAlgorithm
key
CryptoKey
data
BufferSource

Returns

Promise<ArrayBuffer>

deriveBits()

deriveBits(algorithm, baseKey, length): Promise<ArrayBuffer>

Parameters

algorithm
DerivationAlgorithm
baseKey
CryptoKey
length
number

Returns

Promise<ArrayBuffer>

deriveKey()

deriveKey(algorithm, baseKey, derivedKeyAlgorithm, extractable, keyUsages): Promise<CryptoKey>

Parameters

algorithm
DerivationAlgorithm
baseKey
CryptoKey
derivedKeyAlgorithm
DerivedKeyAlgorithm
extractable
boolean
keyUsages
KeyUsage[]

Returns

Promise<CryptoKey>

digest()

digest(algorithm, data): Promise<ArrayBuffer>

Parameters

algorithm
DigestAlgorithm
data
BufferSource

Returns

Promise<ArrayBuffer>

encrypt()

encrypt(algorithm, key, data): Promise<ArrayBuffer>

Parameters

algorithm
EncryptionAlgorithm
key
CryptoKey
data
BufferSource

Returns

Promise<ArrayBuffer>

exportKey()

exportKey(format, key): Promise<ArrayBuffer | JsonWebKey>

Parameters

format
KeyFormat
key
CryptoKey

Returns

Promise<ArrayBuffer | JsonWebKey>

generateKey()

generateKey(algorithm, extractable, usages): Promise<CryptoKey | CryptoKeyPair>

Parameters

algorithm
KeyGenAlgorithm
extractable
boolean
usages
KeyUsage[]

Returns

Promise<CryptoKey | CryptoKeyPair>

importKey()

importKey(format, keyData, algorithm, extractable, keyUsages): Promise<CryptoKey>

Parameters

format
KeyFormat
keyData
algorithm
KeyImportAlgorithm
extractable
boolean
keyUsages
KeyUsage[]

Returns

Promise<CryptoKey>

sign()

sign(algorithm, key, data): Promise<ArrayBuffer>

Parameters

algorithm
SignatureAlgorithm
key
CryptoKey
data
BufferSource

Returns

Promise<ArrayBuffer>

verify()

verify(algorithm, key, signature, data): Promise<boolean>

Parameters

algorithm
SignatureAlgorithm
key
CryptoKey
signature
ArrayBuffer
data
ArrayBuffer

Returns

Promise<boolean>
Last modified on October 2, 2025