Extends
BaseCryptoClass
Extended by
RsaKeyBuilderRsaOaepKeyBuilderEccKeyBuilderDiffieHellmanKeyBuilder
Constructors
new AsymmetricKeyBuilder()
new AsymmetricKeyBuilder(): AsymmetricKeyBuilder
Returns
AsymmetricKeyBuilderMethods
buildGenerated()
buildGenerated():Build a new private key based on the configured properties.Promise<PrivateKey>
Throws
InvalidArgumentErrorIf the chosen key size or the key itself is invalid.
Returns
Promise<PrivateKey>
Promise<PrivateKey> A promise that resolves to the generated private key.
buildPrivateFromDer()
buildPrivateFromDer(der:Import a private key from a DER-encoded blob. The imported key will inherit the properties (algorithm, purposes, exportability) set on this builder.ArrayBuffer):Promise<PrivateKey>
Parameters
der
ArrayBuffer
The DER-encoded private key in PKCS#8 format.
Throws
InvalidArgumentErrorIf the provided key is invalid.
Returns
Promise<PrivateKey>
Promise<PrivateKey> A promise that resolves to the imported private key.
buildPublicFromDer()
buildPublicFromDer(der:Import a public key from a DER-encoded blob. The imported key will inherit the properties (algorithm, purposes) set on this builder.ArrayBuffer):Promise<PublicKey>
Parameters
der
ArrayBuffer
The DER-encoded public key in SubjectPublicKeyInfo format.
Throws
InvalidArgumentErrorIf the provided key is invalid.
Returns
Promise<PublicKey>
Promise<PublicKey> A promise that resolves to the imported public key.
