Botan 3.5.0
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::EME_PKCS1v15::pad(), Botan::AffineCurvePoint< FieldElement, Params >::serialize_compressed_to(), Botan::AffineCurvePoint< FieldElement, Params >::serialize_to(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::sign_message(), and Botan::HSS_LMS_PrivateKeyInternal::to_bytes().
|
inlineconstexpr |
Definition at line 182 of file stl_util.h.
References next().
|
inlineconstexpr |
Definition at line 187 of file stl_util.h.
Referenced by Botan::create_aes_row_generator(), Botan::fors_public_key_from_signature(), Botan::fors_sign_and_pkgen(), Botan::ht_sign(), Botan::EME_PKCS1v15::pad(), Botan::AffineCurvePoint< FieldElement, Params >::serialize_compressed_to(), Botan::AffineCurvePoint< FieldElement, Params >::serialize_to(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::sign_message(), Botan::Keccak_Permutation::squeeze(), Botan::Ciphertext::to_bytes(), Botan::HSS_LMS_PrivateKeyInternal::to_bytes(), Botan::Polynomial::to_bytes(), and Botan::PolynomialVector::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::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::AffineCurvePoint< FieldElement, Params >::serialize_compressed_to(), Botan::AffineCurvePoint< FieldElement, Params >::serialize_to(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::Keccak_Permutation::squeeze(), Botan::Ciphertext::to_bytes(), Botan::Polynomial::to_bytes(), Botan::PolynomialVector::to_bytes(), 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::Keccak_Permutation::squeeze(), and Botan::xmss_sign_and_pkgen().