findSignatureScheme

fun findSignatureScheme(algorithm: <Error class: unknown class>): SignatureScheme


Find SignatureScheme by platform specific schemeNumberID.


Factory pattern to retrieve the corresponding SignatureScheme based on SignatureScheme.schemeCodeName. This function is usually called by key generators and verify signature functions. In case the input is not a key in the supportedSignatureSchemes map, null will be returned.

Return

a currently supported SignatureScheme.

Parameters

schemeCodeName

a String that should match a supported signature scheme code name (e.g. ECDSA_SECP256K1_SHA256), see Crypto.

Throws

if the requested signature scheme is not supported.


Retrieve the corresponding SignatureScheme based on the type of the input Key. This function is usually called when requiring to verify signatures and the signing schemes must be defined. For the supported signature schemes see Crypto.

Return

a currently supported SignatureScheme.

Parameters

key

either private or public.

Throws

if the requested key type is not supported.