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
Native
Skip to main content

Interface IAsymmetricKeyBuilder

interface IAsymmetricKeyBuilder
Extends com.amazon.apmf.IStandard

Methods

algorithm()

IAsymmetricKeyBuilder* algorithm(IAsymmetricAlgorithm* alg)
Set the algorithm this key will be used with.

Parameters

alg
IAsymmetricAlgorithm* — Required The asymmetric algorithm.

Returns

IAsymmetricKeyBuilder* The asymmetric key builder.

purposes()

IAsymmetricKeyBuilder* purposes(string[] purposes)
Set the purposes for the key to be generated.

Parameters

purposes
string[] — Required An array of strings whose elements are constants defined in IKeyWithPurpose.

Returns

IAsymmetricKeyBuilder* The asymmetric key builder.

exportable()

IAsymmetricKeyBuilder* exportable(bool exportable)
Set the exportability for the key to be generated. A key is NOT exportable unless explicitly set so.

Parameters

exportable
bool — Required A boolean value indicating whether the key is exportable.

Returns

IAsymmetricKeyBuilder* The asymmetric key builder.

buildGenerated()

IPrivateKey* buildGenerated()
Build a generated private key.

Returns

IPrivateKey* The generated private key.

buildPrivateFromDer()

IPrivateKey* buildPrivateFromDer(u8[] der)
Import a private key from a DER encoded blob. Private keys should be a DER encoding of the PKCS#8 format.

Parameters

der
u8[] — Required The DER encoded key.

Returns

IPrivateKey* The imported private key.

buildPublicFromDer()

IPublicKey* buildPublicFromDer(u8[] der)
Import a public key from a DER encoded blob. Public keys should be a DER encoding of SubjectPublicKeyInfo.

Parameters

der
u8[] — Required The DER encoded key.

Returns

IPublicKey* The imported public key.
Last modified on October 29, 2026