generatePrivateKey

fun generatePrivateKey(algorithmId: AlgorithmId, options: KeyGenOptions? = null): Jwk

Generates a private key using the specified algorithmId, utilizing the appropriate KeyGenerator.

Return

The generated private key as a Jwk object.

Parameters

algorithmId

The algorithmId AlgorithmId.

options

Options for key generation, may include specific parameters relevant to the algorithm.

Throws

if the provided algorithm or curve is not supported.