Interface IAsymmetricKeyBuilder
interface IAsymmetricKeyBuilder
Extends com.amazon.apmf.IStandard
Methods
algorithm()
Set the algorithm this key will be used with.IAsymmetricKeyBuilder*algorithm(IAsymmetricAlgorithm*alg)
Parameters
alg
IAsymmetricAlgorithm* — Required
The asymmetric algorithm.
Returns
IAsymmetricKeyBuilder*
The asymmetric key builder.
purposes()
Set the purposes for the key to be generated.IAsymmetricKeyBuilder*purposes(string[]purposes)
Parameters
purposes
string[] — Required
An array of strings whose elements are constants
defined in IKeyWithPurpose.
Returns
IAsymmetricKeyBuilder*
The asymmetric key builder.
exportable()
Set the exportability for the key to be generated. A key is NOT exportable unless explicitly set so.IAsymmetricKeyBuilder*exportable(boolexportable)
Parameters
exportable
bool — Required
A boolean value indicating whether the key is
exportable.
Returns
IAsymmetricKeyBuilder*
The asymmetric key builder.
buildGenerated()
Build a generated private key.IPrivateKey*buildGenerated()
Returns
IPrivateKey*
The generated private key.
buildPrivateFromDer()
Import a private key from a DER encoded blob. Private keys should be a DER encoding of the PKCS#8 format.IPrivateKey*buildPrivateFromDer(u8[]der)
Parameters
der
u8[] — Required
The DER encoded key.
Returns
IPrivateKey*
The imported private key.
buildPublicFromDer()
Import a public key from a DER encoded blob. Public keys should be a DER encoding of SubjectPublicKeyInfo.IPublicKey*buildPublicFromDer(u8[]der)
Parameters
der
u8[] — Required
The DER encoded key.
Returns
IPublicKey*
The imported public key.

