Extends
BaseCryptoClass
Constructors
new SymmetricKey()
new SymmetricKey(): SymmetricKeyReturns
SymmetricKeyMethods
exportRaw()
exportRaw():Promise<ArrayBuffer>
Export the symmetric key as raw bytes.
This method should only be called on keys that are marked as exportable.
Throws
- If the key is not exportable.
Returns
Promise<ArrayBuffer>
Promise A promise that resolves to the raw key bytes.
hasPurpose()
hasPurpose(purpose: KeyPurpose):boolean
Check if a particular purpose is enabled for this key.
Parameters
purpose
KeyPurpose A key purpose to check.Throws
- If the argument is not a valid purpose.
Returns
boolean
boolean true if the purpose is enabled for this key, false otherwise.

