Botan 3.6.1
Crypto and TLS for C&
|
Helper class to ease in-place marshalling of concatenated fixed-length values. More...
#include <stl_util.h>
Public Member Functions | |
constexpr void | append (std::span< const uint8_t > buffer) |
constexpr void | append (uint8_t b, size_t repeat=1) |
constexpr | BufferStuffer (std::span< uint8_t > buffer) |
constexpr bool | full () const |
template<size_t bytes> | |
constexpr std::span< uint8_t, bytes > | next () |
constexpr std::span< uint8_t > | next (size_t bytes) |
template<concepts::contiguous_strong_type StrongT> | |
StrongSpan< StrongT > | next (size_t bytes) |
constexpr uint8_t & | next_byte () |
constexpr size_t | remaining_capacity () const |
Helper class to ease in-place marshalling of concatenated fixed-length values.
The size of the final buffer must be known from the start, reallocations are not performed.
Definition at line 142 of file stl_util.h.
|
inlineconstexpr |
Definition at line 144 of file stl_util.h.
|
inlineconstexpr |
Definition at line 177 of file stl_util.h.
References next().
Referenced by Botan::create_aes_row_generator(), Botan::EC_Point::encode(), Botan::Dilithium_Algos::encode_public_key(), Botan::Dilithium_Algos::encode_signature(), Botan::CRYSTALS::pack(), Botan::EC_AffinePoint_Data_BN::serialize_compressed_to(), Botan::EC_AffinePoint_Data_PC::serialize_compressed_to(), Botan::EC_AffinePoint_Data_BN::serialize_uncompressed_to(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::sign_message(), Botan::HSS_LMS_PrivateKeyInternal::to_bytes(), and Botan::TPM2::Context::vendor().
|
inlineconstexpr |
Definition at line 182 of file stl_util.h.
|
inlineconstexpr |
Definition at line 187 of file stl_util.h.
Referenced by Botan::Kyber_Algos::compress_ciphertext(), Botan::create_aes_row_generator(), Botan::Kyber_Algos::encode_polynomial_vector(), Botan::Dilithium_Algos::encode_public_key(), Botan::fors_public_key_from_signature(), Botan::fors_sign_and_pkgen(), Botan::ht_sign(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::sign_message(), Botan::Keccak_Permutation::squeeze(), and Botan::HSS_LMS_PrivateKeyInternal::to_bytes().
|
inlineconstexpr |
Definition at line 159 of file stl_util.h.
References BOTAN_STATE_CHECK.
Referenced by append(), append(), next(), and next_byte().
|
inlineconstexpr |
bytes
bytes in the concatenated buffer. Checks that the buffer is not exceded. Definition at line 150 of file stl_util.h.
References BOTAN_STATE_CHECK.
Referenced by Botan::Kyber_Algos::compress_ciphertext(), Botan::create_aes_row_generator(), Botan::EC_Point::encode(), Botan::BigInt::encode_fixed_length_int_pair(), Botan::fors_public_key_from_signature(), Botan::fors_sign_and_pkgen(), Botan::ht_sign(), Botan::EC_AffinePoint_Data_BN::serialize_compressed_to(), Botan::EC_AffinePoint_Data_PC::serialize_compressed_to(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::Keccak_Permutation::squeeze(), Botan::wots_public_key_from_signature(), Botan::wots_sign_and_pkgen(), and Botan::xmss_sign_and_pkgen().
|
inline |
Definition at line 168 of file stl_util.h.
References next().
|
inlineconstexpr |
Definition at line 175 of file stl_util.h.
References next().
Referenced by Botan::Keccak_Permutation::squeeze().
|
inlineconstexpr |
Definition at line 189 of file stl_util.h.
Referenced by Botan::create_aes_row_generator(), Botan::CRYSTALS::pack(), Botan::Keccak_Permutation::squeeze(), Botan::TPM2::Context::vendor(), and Botan::xmss_sign_and_pkgen().