JwsService

interface JwsService

Creates and parses JWS and JWE objects.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun createSignedJws(header: JwsHeader, payload: ByteArray): String?
Link copied to clipboard
abstract suspend fun createSignedJwsAddingParams(header: JwsHeader, payload: ByteArray, addKeyId: Boolean = true, addJsonWebKey: Boolean = true): String?

Appends correct values for JweHeader.keyId, JwsHeader.algorithm and JwsHeader.jsonWebKey, if the corresponding options are set

Link copied to clipboard
abstract suspend fun createSignedJwt(type: String, payload: ByteArray, contentType: String? = null): String?
Link copied to clipboard
abstract suspend fun decryptJweObject(jweObject: JweEncrypted, serialized: String): JweDecrypted?
Link copied to clipboard
abstract fun encryptJweObject(type: String, payload: ByteArray, recipientKey: JsonWebKey, contentType: String? = null, jweAlgorithm: JweAlgorithm, jweEncryption: JweEncryption): String?