CryptoService

interface CryptoService

Functions

Link copied to clipboard
abstract suspend fun decrypt(key: ByteArray, iv: ByteArray, aad: ByteArray, input: ByteArray, authTag: ByteArray, algorithm: JweEncryption): KmmResult<ByteArray>
Link copied to clipboard
abstract fun encrypt(key: ByteArray, iv: ByteArray, aad: ByteArray, input: ByteArray, algorithm: JweEncryption): KmmResult<AuthenticatedCiphertext>
Link copied to clipboard
abstract fun generateEphemeralKeyPair(ecCurve: EcCurve): KmmResult<EphemeralKeyHolder>
Link copied to clipboard
abstract fun messageDigest(input: ByteArray, digest: Digest): KmmResult<ByteArray>
Link copied to clipboard
abstract fun performKeyAgreement(ephemeralKey: JsonWebKey, algorithm: JweAlgorithm): KmmResult<ByteArray>
abstract fun performKeyAgreement(ephemeralKey: EphemeralKeyHolder, recipientKey: JsonWebKey, algorithm: JweAlgorithm): KmmResult<ByteArray>
Link copied to clipboard
abstract suspend fun sign(input: ByteArray): KmmResult<ByteArray>
Link copied to clipboard
abstract fun toJsonWebKey(): JsonWebKey

Properties

Link copied to clipboard
Link copied to clipboard
abstract val keyId: String

Inheritors

Link copied to clipboard