getKeyGenerator

Retrieves a KeyGenerator based on the provided algorithmId. Currently, we provide key generators for keys that use ECC (see AlgorithmId enum)

This function looks up and retrieves the relevant KeyGenerator based on the provided algorithmId.

Return

The corresponding KeyGenerator.

Parameters

algorithmId

The cryptographic algorithmId to find a key generator for.

Throws

if the algorithm or curve is not supported.


fun getKeyGenerator(multiCodec: Int): KeyGenerator

Retrieves a KeyGenerator based on the provided multicodec identifier.

This function looks up and retrieves the relevant KeyGenerator based on the provided multicodec identifier.

Return

The corresponding KeyGenerator.

Parameters

multiCodec

The multicodec identifier to find a key generator for.

Throws

if the multicodec is not supported.