BIP324Cipher::Encrypt

Encrypt a packet. Only after Initialize().

Synopsis

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;

Description

It must hold that output.size() == contents.size() + EXPANSION.

Parameters

NameDescription
contentsThe plaintext packet contents to encrypt.
aadAssociated authenticated data covered by the tag but not encrypted.
ignoreWhether to set the ignore bit in the packet header.
outputOutput buffer receiving the encrypted packet.