EncryptionOnlyKey
class EncryptionOnlyKey(val identifier: EncryptionKey.Identifier, val publicKey: Key) : EncryptionKey, JweEncryptor(source)
An encryption-only key that holds only the public key material, implementing JweEncryptor.
Used when a token must be encrypted but decryption is not performed by the same key holder (e.g. asymmetric algorithms where only the public key is available). Accessing privateKey on this type throws.
Properties
Functions
Link copied to clipboard
open suspend override fun encrypt(data: ByteArray, aad: ByteArray, contentAlgorithm: EncryptionContentAlgorithm): JweEncryptResult
Link copied to clipboard