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 ICrypto

interface ICrypto
Extends com.amazon.apmf.IStandard

Methods

getSupportedDigestAlgorithms()

IDigestAlgorithm*[] getSupportedDigestAlgorithms()
List supported digest algorithms. This function returns an array containing all supported digest algorithms. Users can iterate over this array to obtain information about each supported digest algorithm.

Returns

IDigestAlgorithm*[] An array of supported digest algorithms.

getDigestAlgorithmByName()

IDigestAlgorithm* getDigestAlgorithmByName(string name)
Get a digest algorithm by name. This function retrieves a digest algorithm based on its name. If the algorithm with the given name is supported, it returns the requested algorithm.

Parameters

name
string — Required The name of the algorithm.

Returns

IDigestAlgorithm* the requested algorithm

Throws


getSupportedSymmetricAlgorithms()

ISymmetricAlgorithm*[] getSupportedSymmetricAlgorithms()
List supported symmetric algorithms. This function returns an array containing all supported symmetric algorithms. Users can iterate over this array to obtain information about each supported digest algorithm.

Returns

ISymmetricAlgorithm*[] An array of supported symmetric algorithms.

getSymmetricAlgorithmByName()

ISymmetricAlgorithm* getSymmetricAlgorithmByName(string name)
Get a symmetric algorithm by name. This function retrieves a symmetric algorithm based on its name. The name parameter specifies the name of the algorithm to retrieve. If the specified algorithm is supported, it returns an object representing the requested algorithm.

Parameters

name
string — Required The name of the symmetric algorithm to retrieve.

Returns

ISymmetricAlgorithm* An object representing the requested symmetric algorithm.

Throws


makeSymmetricKeyBuilder()

ISymmetricKeyBuilder* makeSymmetricKeyBuilder()
Make an object that can be used to build symmetric keys. This function creates an instance of an object that can be used to build symmetric keys.

Returns

ISymmetricKeyBuilder* A new ISymmetricKeyBuilder object.

makeGcmCipherContextBuilder()

IGcmContextBuilder* makeGcmCipherContextBuilder(ISymmetricAlgorithm* alg)
Make an object for building a cipher context in GCM mode. This function creates an instance of an object that can be used to build a cipher context in GCM mode. It takes an ISymmetricAlgorithm object as a parameter specifying the algorithm to use.

Parameters

alg
ISymmetricAlgorithm* — Required An ISymmetricAlgorithm object representing the algorithm to use.

Returns

IGcmContextBuilder* A new IGcmContextBuilder object.

makeCbcCipherContextBuilder()

ICbcContextBuilder* makeCbcCipherContextBuilder(ISymmetricAlgorithm* alg)
Make an object for building a cipher context in CBC mode. This function creates an instance of an object that can be used to build a cipher context in CBC mode. It takes an ISymmetricAlgorithm object as a parameter specifying the algorithm to use.

Parameters

alg
ISymmetricAlgorithm* — Required An ISymmetricAlgorithm object representing the algorithm to use.

Returns

ICbcContextBuilder* A new ICbcContextBuilder object.

makeCtrCipherContextBuilder()

ICtrContextBuilder* makeCtrCipherContextBuilder(ISymmetricAlgorithm* alg)
Make an object for building a cipher context in CTR mode. This function creates an instance of an object that can be used to build a cipher context in CTR mode. It takes an ISymmetricAlgorithm object as a parameter specifying the algorithm to use.

Parameters

alg
ISymmetricAlgorithm* — Required An ISymmetricAlgorithm object representing the algorithm to use.

Returns

ICtrContextBuilder* A new ICtrContextBuilder object.

getAsymmetricAlgorithmByName()

IAsymmetricAlgorithm* getAsymmetricAlgorithmByName(string name)
Get an asymmetric algorithm by name. This function retrieves an asymmetric algorithm by its name.

Parameters

name
string — Required The name of the algorithm.

Returns

IAsymmetricAlgorithm* The requested algorithm.

Throws


getSupportedSignatureAlgorithms()

IAsymmetricAlgorithm*[] getSupportedSignatureAlgorithms()
List supported signature algorithms. This function returns an array of supported signature algorithms.

Returns

IAsymmetricAlgorithm*[] An array of supported signature algorithms.

makeSignatureContextBuilder()

ISignatureContextBuilder* makeSignatureContextBuilder()
Make an object for building a signature context. This function creates an object that can be used to build a signature context.

Returns

ISignatureContextBuilder* An object for building a signature context.

getSupportedEccCurves()

IEccCurve*[] getSupportedEccCurves()
List supported elliptic-curve cryptography curves. This function returns an array of supported elliptic-curve cryptography curves.

Returns

IEccCurve*[] An array of supported elliptic-curve cryptography curves.

getEccCurveByName()

IEccCurve* getEccCurveByName(string name)
Get an elliptic-curve cryptography curve by name. This function retrieves an elliptic-curve cryptography curve by its name.

Parameters

name
string — Required The name of the curve.

Returns

IEccCurve* The requested curve.

Throws


getWrappingSchemeByName()

IWrappingScheme* getWrappingSchemeByName(string name)
Get a wrapping scheme by name. This function retrieves a wrapping scheme by its name.

Parameters

name
string — Required The name of the wrapping scheme.

Returns

IWrappingScheme* The requested wrapping scheme.

Throws


makeAsymmetricKeyBuilder()

IAsymmetricKeyBuilder* makeAsymmetricKeyBuilder()
Make an asymmetric key builder. This function creates an object that can be used to build asymmetric keys.

Returns

IAsymmetricKeyBuilder* The asymmetric key builder object.

getSupportedAsymmetricCipherAlgorithms()

IAsymmetricAlgorithm*[] getSupportedAsymmetricCipherAlgorithms()
Get supported asymmetric cipher algorithms. This function retrieves a list of supported asymmetric cipher algorithms.

Returns

IAsymmetricAlgorithm*[] An array of supported asymmetric cipher algorithms.

makeAsymmetricCipherContextBuilder()

IAsymmetricCipherContextBuilder* makeAsymmetricCipherContextBuilder(IAsymmetricAlgorithm* alg)
Make an object for building cipher contexts using asymmetric cryptography. This function creates an object that can be used to build cipher contexts using asymmetric cryptography.

Parameters

alg
IAsymmetricAlgorithm* — Required The asymmetric algorithm to be used.

Returns

IAsymmetricCipherContextBuilder* The asymmetric cipher context builder object.

makeRsaOaepCipherContextBuilder()

IRsaOaepContextBuilder* makeRsaOaepCipherContextBuilder(IAsymmetricAlgorithm* alg, IDigestAlgorithm* sha)
Make an object for building RSA OAEP cipher contexts. This function creates an object that can be used to build RSA OAEP cipher contexts for asymmetric cryptography.

Parameters

alg
IAsymmetricAlgorithm* — Required The asymmetric algorithm to be used.
sha
IDigestAlgorithm* — Required The digest algorithm for SHA.

Returns

IRsaOaepContextBuilder* The RSA OAEP cipher context builder object.

makeHmacContextBuilder()

IHmacContextBuilder* makeHmacContextBuilder()
Make an object for building HMAC contexts. This function creates an object that can be used to build HMAC contexts.

Returns

IHmacContextBuilder* The HMAC context builder object.

getRandom()

u8[] getRandom(i32 length)
Get random data.

Parameters

length
i32 — Required The length of the random data to generate.

Returns

u8[] An array of random bytes.

makeDigestContextBuilder()

IDigestContextBuilder* makeDigestContextBuilder()
Make an object for building Digest contexts.

Returns

IDigestContextBuilder* A builder for Digest contexts.
Last modified on October 29, 2026