pub fn encode_aead(
shared_secret: &[u8],
plaintext: &[u8],
aad: &[u8],
) -> Result<KkAeadPacket>Expand description
Encode plaintext with authenticated associated data (AEAD).
The AAD is included in the commitment MAC but is NOT encrypted. This is useful for metadata (headers, routing info, version tags) that must be readable in the clear but tamper-proof.
ยงArguments
shared_secret- the pre-shared keyplaintext- data to encryptaad- associated data to authenticate (not encrypted)