create

fun create(issuerKey: EcPrivateKey, issuerAlgorithm: Algorithm, issuerCertChain: X509CertChain?, kbKey: EcPublicKey?, claims: JsonObject, nonSdClaims: JsonObject, digestAlgorithm: Algorithm = Algorithm.SHA256, random: Random = Random.Default, saltSizeNumBits: Int = 128): SdJwt

Creates a SD-JWT.

This implementation uses recursive disclosures for all claims in the claims parameter.

Parameters

issuerKey

the key to sign the issuerSigned JWT with.

issuerAlgorithm

the algorithm to use for signing, e.g. Algorithm.ESP256.

issuerCertChain

if set, this will be included as a x5c header element in the Issuer-signed JWT.

kbKey

if set, a cnf claim with this public key will be included in the Issuer-signed JWT.

claims

the object with claims that can be selectively disclosed.

nonSdClaims

claims to include in the Issuer-signed JWT which are always disclosed. This must at least include the iss claim and may include more such as vct, sub, iat, nbf, exp.

digestAlgorithm

the hash algorithm to use, e.g. Algorithm.SHA256.

random

the Random to use to generate salts.

saltSizeNumBits

number of bits to use for each salt.