Decrypter

An object which can be used for HPKE decryption.

Use getDecrypter to create an instance.

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

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
suspend fun decrypt(ciphertext: ByteArray, aad: ByteArray): ByteArray

Decrypts an encrypted message from the sender.

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

Exports a secret.