Jws Service
Properties
Link copied to clipboard
Algorithm which will be used to sign JWS in createSignedJws, createSignedJwt, createSignedJwsAddingParams.
Link copied to clipboard
Algorithm which can be used to encrypt JWE, that can be decrypted with decryptJweObject.
Link copied to clipboard
Encoding which can be used to encrypt JWE, that can be decrypted with decryptJweObject.
Functions
Link copied to clipboard
Link copied to clipboard
abstract suspend fun createSignedJwsAddingParams(header: JwsHeader? = null, payload: ByteArray, addKeyId: Boolean = true, addJsonWebKey: Boolean = true, addX5c: Boolean = false): KmmResult<JwsSigned>
Appends correct values for JwsHeader.algorithm, JweHeader.keyId (if addKeyId is true), and JwsHeader.jsonWebKey (if addJsonWebKey is true).
Link copied to clipboard
abstract suspend fun createSignedJwt(type: String, payload: ByteArray, contentType: String? = null): KmmResult<JwsSigned>
Link copied to clipboard
abstract suspend fun decryptJweObject(jweObject: JweEncrypted, serialized: String): KmmResult<JweDecrypted>
Link copied to clipboard
abstract suspend fun encryptJweObject(header: JweHeader? = null, payload: ByteArray, recipientKey: JsonWebKey, jweAlgorithm: JweAlgorithm, jweEncryption: JweEncryption): KmmResult<JweEncrypted>
abstract fun encryptJweObject(type: String, payload: ByteArray, recipientKey: JsonWebKey, contentType: String? = null, jweAlgorithm: JweAlgorithm, jweEncryption: JweEncryption): KmmResult<JweEncrypted>