Decrypt a packet. Only after Initialize().
Declared in <bip324.h>
bool
Decrypt(
std::span<std::byte const> input,
std::span<std::byte const> aad,
bool& ignore,
std::span<std::byte> contents) noexcept;
It must hold that input.size() + LENGTH_LEN == contents.size() + EXPANSION. Contents.size() must equal the length returned by DecryptLength.
True if authentication and decryption succeeded.
| Name | Description |
|---|---|
| input | The encrypted packet body (excluding the length field). |
| aad | Associated authenticated data covered by the tag but not encrypted. |
| ignore | Set to true if the decrypted packet has the ignore bit set. |
| contents | Output buffer receiving the decrypted contents. |