31 Poly1305 poly_full{key}, poly_split{key};
34 std::vector<std::byte> total_input;
39 poly_split.Update(in);
41 total_input.insert(total_input.end(), in.begin(), in.end());
45 poly_full.
Update(total_input);
48 std::array<std::byte, Poly1305::TAGLEN> tag_split, tag_full;
51 assert(tag_full == tag_split);
std::vector< T > ConsumeBytes(size_t num_bytes)
C++ wrapper with std::byte span interface around poly1305_donna code.
void Finalize(std::span< std::byte > out) noexcept
Write authentication tag to 16-byte out.
Poly1305 & Update(std::span< const std::byte > msg) noexcept
Process message bytes.
static constexpr unsigned KEYLEN
Length of the keys expected by the constructor.
static constexpr unsigned TAGLEN
Length of the output produced by Finalize().
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
std::vector< B > ConsumeFixedLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const size_t length) noexcept
Returns a byte vector of specified size regardless of the number of remaining bytes available from th...
std::vector< B > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept