as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

AsymmetricKeyBuilder

A builder class for creating and importing asymmetric keys. This class provides methods to configure key properties and generate or import both public and private keys.

Extends

  • BaseCryptoClass

Extended by

Constructors

new AsymmetricKeyBuilder()

new AsymmetricKeyBuilder(): AsymmetricKeyBuilder

Returns

AsymmetricKeyBuilder

Methods

buildGenerated()

buildGenerated(): Promise<PrivateKey>

Build a new private key based on the configured properties.

Throws

  • If the chosen key size or the key itself is invalid.

Returns

Promise<PrivateKey>

Promise A promise that resolves to the generated private key.


buildPrivateFromDer()

buildPrivateFromDer(der: ArrayBuffer): Promise<PrivateKey>

Import a private key from a DER-encoded blob.

The imported key will inherit the properties (algorithm, purposes, exportability) set on this builder.

Parameters

der

ArrayBuffer

The DER-encoded private key in PKCS#8 format.

Throws

  • If the provided key is invalid.

Returns

Promise<PrivateKey>

Promise A promise that resolves to the imported private key.


buildPublicFromDer()

buildPublicFromDer(der: ArrayBuffer): Promise<PublicKey>

Import a public key from a DER-encoded blob.

The imported key will inherit the properties (algorithm, purposes) set on this builder.

Parameters

der

ArrayBuffer

The DER-encoded public key in SubjectPublicKeyInfo format.

Throws

  • If the provided key is invalid.

Returns

Promise<PublicKey>

Promise A promise that resolves to the imported public key.


Last updated: Jul 22, 2026