Botan 3.6.1
Crypto and TLS for C&
|
#include <stl_util.h>
Public Member Functions | |
BufferSlicer (std::span< const uint8_t > buffer) | |
template<concepts::contiguous_container ContainerT> | |
auto | copy (const size_t count) |
auto | copy_as_secure_vector (const size_t count) |
auto | copy_as_vector (const size_t count) |
void | copy_into (std::span< uint8_t > sink) |
bool | empty () const |
size_t | remaining () const |
void | skip (const size_t count) |
template<size_t count> | |
std::span< const uint8_t, count > | take () |
std::span< const uint8_t > | take (const size_t count) |
template<concepts::contiguous_strong_type T> | |
StrongSpan< const T > | take (const size_t count) |
uint8_t | take_byte () |
Helper class to ease unmarshalling of concatenated fixed-length values
Definition at line 84 of file stl_util.h.
|
inline |
Definition at line 86 of file stl_util.h.
|
inline |
Definition at line 89 of file stl_util.h.
References take().
Referenced by copy_as_secure_vector(), copy_as_vector(), Botan::Kyber_Expanded_Keypair_Codec::decode_keypair(), Botan::ML_KEM_Expanding_Keypair_Codec::decode_keypair(), Botan::Dilithium_Algos::decode_public_key(), Botan::Dilithium_Algos::decode_signature(), Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey(), Botan::FrodoKEM_PublicKey::FrodoKEM_PublicKey(), Botan::HSS_LMS_PrivateKeyInternal::from_bytes_or_throw(), Botan::LMS_PublicKey::from_bytes_or_throw(), Botan::LMS_Signature::from_bytes_or_throw(), and Botan::Sphincs_Hash_Functions::H_msg().
|
inline |
Definition at line 96 of file stl_util.h.
References copy().
Referenced by Botan::TLS::Session::decrypt().
|
inline |
Definition at line 94 of file stl_util.h.
References copy().
Referenced by Botan::LMOTS_Signature::from_bytes_or_throw().
|
inline |
Definition at line 120 of file stl_util.h.
References take().
Referenced by Botan::CRYSTALS::detail::as_byte_source().
|
inline |
Definition at line 129 of file stl_util.h.
Referenced by Botan::Keccak_Permutation::absorb(), Botan::BLAKE2b::add_data(), Botan::Streebog::add_data(), Botan::MD4::compress_n(), Botan::compute_root(), Botan::compute_root(), Botan::OID::decode_from(), Botan::Kyber_Expanded_Keypair_Codec::decode_keypair(), Botan::ML_KEM_Expanding_Keypair_Codec::decode_keypair(), Botan::Kyber_Algos::decode_polynomial_vector(), Botan::Dilithium_Algos::decode_public_key(), Botan::Dilithium_Algos::decode_signature(), Botan::Kyber_Algos::decompress_ciphertext(), Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey(), Botan::FrodoKEM_PublicKey::FrodoKEM_PublicKey(), Botan::HSS_LMS_PrivateKeyInternal::from_bytes_or_throw(), Botan::HSS_LMS_PublicKeyInternal::from_bytes_or_throw(), Botan::HSS_Signature::from_bytes_or_throw(), Botan::Sphincs_Hash_Functions::H_msg(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::handle_unaligned_data(), Botan::ht_verify(), Botan::TLS::Hybrid_KEM_PublicKey::load_for_group(), and Botan::MerkleDamgard_Hash< MD >::update().
|
inline |
Definition at line 127 of file stl_util.h.
Referenced by Botan::Keccak_Permutation::absorb(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::aligned_data_to_process(), Botan::Dilithium_Algos::decode_signature(), Botan::TLS::Session::decrypt(), Botan::HSS_LMS_PrivateKeyInternal::from_bytes_or_throw(), Botan::LMOTS_Signature::from_bytes_or_throw(), Botan::LMS_PublicKey::from_bytes_or_throw(), Botan::LMS_Signature::from_bytes_or_throw(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::handle_unaligned_data(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::next_aligned_block_to_process(), take(), and take().
|
inline |
Definition at line 125 of file stl_util.h.
References take().
Referenced by Botan::XMSS_PublicKey::XMSS_PublicKey().
|
inline |
Definition at line 106 of file stl_util.h.
References BOTAN_STATE_CHECK, and remaining().
Referenced by copy(), copy_into(), skip(), take(), and take_byte().
|
inline |
Definition at line 98 of file stl_util.h.
References BOTAN_STATE_CHECK, and remaining().
Referenced by Botan::Keccak_Permutation::absorb(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::aligned_data_to_process(), Botan::SHA_256::compress_digest(), Botan::SHA_512::compress_digest(), Botan::SHA_512::compress_digest_bmi2(), Botan::SHA_256::compress_digest_x86_bmi2(), Botan::MD4::compress_n(), Botan::MD5::compress_n(), Botan::RIPEMD_160::compress_n(), Botan::SHA_1::compress_n(), Botan::SM3::compress_n(), Botan::Whirlpool::compress_n(), Botan::compute_root(), Botan::compute_root(), Botan::Kyber_Expanded_Keypair_Codec::decode_keypair(), Botan::Kyber_Algos::decompress_ciphertext(), Botan::TLS::Session::decrypt(), Botan::fors_public_key_from_signature(), Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey(), Botan::FrodoKEM_PublicKey::FrodoKEM_PublicKey(), Botan::HSS_LMS_PrivateKeyInternal::from_bytes_or_throw(), Botan::HSS_LMS_PublicKeyInternal::from_bytes_or_throw(), Botan::HSS_Signature::from_bytes_or_throw(), Botan::LMOTS_Signature::from_bytes_or_throw(), Botan::LMS_PublicKey::from_bytes_or_throw(), Botan::LMS_Signature::from_bytes_or_throw(), Botan::Sphincs_Hash_Functions::H_msg(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::handle_unaligned_data(), Botan::ht_verify(), Botan::TLS::Hybrid_KEM_PublicKey::load_for_group(), Botan::AlignmentBuffer< T, BLOCK_SIZE, FINAL_BLOCK_STRATEGY >::next_aligned_block_to_process(), and Botan::wots_public_key_from_signature().
|
inline |
Definition at line 114 of file stl_util.h.
References take().
|
inline |
Definition at line 118 of file stl_util.h.
References take().
Referenced by Botan::Keccak_Permutation::absorb().