MessageKeys

data class MessageKeys(val chachaKey: ByteArray, val chachaNonce: ByteArray, val hmacKey: ByteArray)

Container for per-message cryptographic keys.

Holds the ephemeral keys derived for encrypting/decrypting a single message. Keys should be cleared from memory after use via clear.

Constructors

Link copied to clipboard
constructor(chachaKey: ByteArray, chachaNonce: ByteArray, hmacKey: ByteArray)

Properties

Link copied to clipboard

The 32-byte ChaCha20 encryption key

Link copied to clipboard

The 12-byte ChaCha20 nonce

Link copied to clipboard

The 32-byte HMAC-SHA256 key

Functions

Link copied to clipboard
fun clear()

Securely clears all keys from memory by overwriting with zeros.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int