[#BIP324Cipher-Encrypt] = xref:BIP324Cipher.adoc[BIP324Cipher]::Encrypt :relfileprefix: ../ :mrdocs: Encrypt a packet. Only after Initialize(). == Synopsis Declared in `<bip324.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void Encrypt( std::span<std::byte const> contents, std::span<std::byte const> aad, bool ignore, std::span<std::byte> output) noexcept; ---- == Description It must hold that output.size() == contents.size() + EXPANSION. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#