Extends
BaseCryptoClass
Constructors
new PublicKey()
new PublicKey(): PublicKey
Returns
PublicKeyMethods
exportDer()
exportDer(): Promise<ArrayBuffer>
Export the public key as a DER-encoded blob.
The public key is exported in SubjectPublicKeyInfo format as
described in RFC 5280, Section 4.1.
Throws
AccessDeniedErrorIf the key is not exportable.
Returns
Promise<ArrayBuffer>
Promise<ArrayBuffer> A promise that resolves to an ArrayBuffer
containing the DER-encoded key.
hasPurpose()
hasPurpose(purpose: KeyPurpose): boolean
Check if a specific purpose is enabled for this public key.
Parameters
purpose
KeyPurpose The purpose to check.Throws
InvalidArgumentErrorIf the argument is not a valid purpose.
Returns
boolean
boolean True if the specified purpose is enabled, false otherwise.
