Encrypt a packet. Only after Initialize().
Declared in <bip324.h>
void
Encrypt(
std::span<std::byte const> contents,
std::span<std::byte const> aad,
bool ignore,
std::span<std::byte> output) noexcept;
It must hold that output.size() == contents.size() + EXPANSION.
| Name | Description |
|---|---|
| contents | The plaintext packet contents to encrypt. |
| aad | Associated authenticated data covered by the tag but not encrypted. |
| ignore | Whether to set the ignore bit in the packet header. |
| output | Output buffer receiving the encrypted packet. |