sign

fun sign(key: EcPrivateKey, signatureAlgorithm: Algorithm, claimsSet: JsonObject, type: String?, x5c: X509CertChain?): String

Sign a claims set.

Return

the compact serialization with the JWS.

Parameters

key

the key to sign with.

signatureAlgorithm

a fully-specified signature algorithm to use.

claimsSet

the claims set.

type

the value to put in the "typ" header parameter or null.

x5c

: the certificate chain to put in the "x5c" header parameter or null.


suspend fun sign(secureArea: SecureArea, alias: String, keyUnlockData: KeyUnlockData?, claimsSet: JsonObject, type: String?, x5c: X509CertChain?): String

Sign a claims set using a SecureArea.

Return

the compact serialization of the JWS.

Parameters

secureArea

the SecureArea for the key to sign with.

alias

the alias for key to sign with.

keyUnlockData

the KeyUnlockData to use or null.

claimsSet

the claims set.

type

the value to put in the "typ" header parameter or null.

x5c

: the certificate chain to put in the "x5c" header parameter or null.