Encrypter

data class Encrypter

An object which can be used for HPKE encryption.

Use getEncrypter to create an instance.

This can be used for either single-shot operation or for encrypting multiple messages. When used to encrypt multiple messages the sequence counter is automatically managed by this object.

Properties

Link copied to clipboard
val encapsulatedKey: ByteString

the encapsulated key which should be sent to the receiver.

Functions

Link copied to clipboard
fun encrypt(plaintext: ByteArray, aad: ByteArray): ByteArray

Encrypts a message to the receiver.

Link copied to clipboard
fun exportSecret(context: ByteArray, length: Int): ByteArray

Exports a secret.