Botan 3.6.1
Crypto and TLS for C&
|
#include <buf_comp.h>
Public Member Functions | |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | final () |
void | final (std::span< uint8_t > out) |
template<concepts::resizable_byte_buffer T> | |
void | final (T &out) |
void | final (uint8_t out[]) |
std::vector< uint8_t > | final_stdvec () |
virtual size_t | output_length () const =0 |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | process (const uint8_t in[], size_t length) |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | process (std::span< const uint8_t > in) |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | process (std::string_view in) |
void | update (const uint8_t in[], size_t length) |
void | update (std::span< const uint8_t > in) |
void | update (std::string_view str) |
void | update (uint8_t in) |
void | update_be (uint16_t val) |
void | update_be (uint32_t val) |
void | update_be (uint64_t val) |
void | update_le (uint16_t val) |
void | update_le (uint32_t val) |
void | update_le (uint64_t val) |
virtual | ~Buffered_Computation ()=default |
This class represents any kind of computation which uses an internal state, such as hash functions or MACs
Definition at line 23 of file buf_comp.h.
|
virtualdefault |
|
inline |
Complete the computation and retrieve the final result as a container of your choice.
Definition at line 78 of file buf_comp.h.
References T.
|
inline |
Definition at line 86 of file buf_comp.h.
References BOTAN_ARG_CHECK.
|
inline |
Definition at line 92 of file buf_comp.h.
|
inline |
Complete the computation and retrieve the final result.
out | The byte array to be filled with the result. Must be of length output_length() |
Definition at line 70 of file buf_comp.h.
Referenced by Botan::ed25519_gen_keypair(), Botan::ed25519_sign(), Botan::ed25519_verify(), Botan::PseudorandomKeyGeneration::gen(), Botan::TPM2::Verification_Operation::is_valid_signature(), Botan::mgf1_mask(), Botan::pbkdf2(), Botan::Sphincs_Hash_Functions_Sha2::PRF_msg(), Botan::Sphincs_Hash_Functions_Shake::PRF_msg(), and Botan::TPM2::Signature_Operation::sign().
|
inline |
|
pure virtual |
Implemented in Botan::Adler32, Botan::ANSI_X919_MAC, Botan::BLAKE2b, Botan::BLAKE2bMAC, Botan::BLAKE2s, Botan::CMAC, Botan::Comb4P, Botan::CRC24, Botan::CRC32, Botan::GMAC, Botan::GOST_34_11, Botan::HMAC, Botan::Keccak_1600, Botan::KMAC, Botan::MD4, Botan::MD5, Botan::Parallel, Botan::Poly1305, Botan::RawHashFunction, Botan::RIPEMD_160, Botan::SHA_1, Botan::SHA_224, Botan::SHA_256, Botan::SHA_384, Botan::SHA_3, Botan::SHA_512, Botan::SHA_512_256, Botan::SHAKE_128, Botan::SHAKE_256, Botan::SipHash, Botan::Skein_512, Botan::SM3, Botan::Streebog, Botan::TPM2::HashFunction, Botan::Truncated_Hash, and Botan::Whirlpool.
Referenced by Botan::PseudorandomKeyGeneration::gen(), Botan::mgf1_mask(), Botan::pbkdf2(), and Botan::TLS::TLS_CBC_HMAC_AEAD_Mode::TLS_CBC_HMAC_AEAD_Mode().
|
inline |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a byte array |
length | the length of the byte array |
Definition at line 105 of file buf_comp.h.
Referenced by Botan::Kyber_Symmetric_Primitives::H(), Botan::Kyber_Symmetric_Primitives::H(), and Botan::Kyber_Symmetric_Primitives::H().
|
inline |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a contiguous container |
Definition at line 129 of file buf_comp.h.
|
inline |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a string |
Definition at line 117 of file buf_comp.h.
|
inline |
Add new input to process.
in | the input to process as a byte array |
length | of param in in bytes |
Definition at line 35 of file buf_comp.h.
Referenced by Botan::ed25519_gen_keypair(), Botan::ed25519_sign(), Botan::ed25519_verify(), Botan::PseudorandomKeyGeneration::gen(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), Botan::mgf1_mask(), Botan::pbkdf2(), Botan::Sphincs_Hash_Functions_Sha2::PRF_msg(), Botan::Sphincs_Hash_Functions_Shake::PRF_msg(), and Botan::Sphincs_Hash_Functions_Shake::Sphincs_Hash_Functions_Shake().
|
inline |
Add new input to process.
in | the input to process as a contiguous data range |
Definition at line 41 of file buf_comp.h.
|
inline |
Add new input to process.
str | the input to process as a std::string_view. Will be interpreted as a byte array based on the strings encoding. |
Definition at line 56 of file buf_comp.h.
References Botan::cast_char_ptr_to_uint8().
|
inline |
Process a single byte.
in | the byte to process |
Definition at line 62 of file buf_comp.h.
void Botan::Buffered_Computation::update_be | ( | uint16_t | val | ) |
Definition at line 13 of file buf_comp.cpp.
References Botan::store_be().
Referenced by Botan::mgf1_mask(), and Botan::pbkdf2().
void Botan::Buffered_Computation::update_be | ( | uint32_t | val | ) |
Definition at line 19 of file buf_comp.cpp.
References Botan::store_be().
void Botan::Buffered_Computation::update_be | ( | uint64_t | val | ) |
Definition at line 25 of file buf_comp.cpp.
References Botan::store_be().
void Botan::Buffered_Computation::update_le | ( | uint16_t | val | ) |
Definition at line 31 of file buf_comp.cpp.
References Botan::store_le().
void Botan::Buffered_Computation::update_le | ( | uint32_t | val | ) |
Definition at line 37 of file buf_comp.cpp.
References Botan::store_le().
void Botan::Buffered_Computation::update_le | ( | uint64_t | val | ) |
Definition at line 43 of file buf_comp.cpp.
References Botan::store_le().