Botan 3.0.0-alpha0
Crypto and TLS for C&
|
#include <shake.h>
Public Member Functions | |
void | clear () override |
HashFunction * | clone () const |
std::unique_ptr< HashFunction > | copy_state () const override |
secure_vector< uint8_t > | final () |
template<typename Alloc > | |
void | final (std::vector< uint8_t, Alloc > &out) |
void | final (uint8_t out[]) |
std::vector< uint8_t > | final_stdvec () |
size_t | hash_block_size () const override |
std::string | name () const override |
std::unique_ptr< HashFunction > | new_object () const override |
size_t | output_length () const override |
secure_vector< uint8_t > | process (const secure_vector< uint8_t > &in) |
secure_vector< uint8_t > | process (const std::string &in) |
secure_vector< uint8_t > | process (const std::vector< uint8_t > &in) |
secure_vector< uint8_t > | process (const uint8_t in[], size_t length) |
virtual std::string | provider () const |
SHAKE_256 (size_t output_bits) | |
void | update (const secure_vector< uint8_t > &in) |
void | update (const std::string &str) |
void | update (const std::vector< uint8_t > &in) |
void | update (const uint8_t in[], size_t length) |
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) |
Static Public Member Functions | |
static std::unique_ptr< HashFunction > | create (const std::string &algo_spec, const std::string &provider="") |
static std::unique_ptr< HashFunction > | create_or_throw (const std::string &algo_spec, const std::string &provider="") |
static std::vector< std::string > | providers (const std::string &algo_spec) |
|
explicit |
output_bits | the desired output size in bits must be a multiple of 8 |
Definition at line 55 of file shake.cpp.
References Botan::ASN1::to_string().
|
overridevirtual |
Reset the state.
Implements Botan::HashFunction.
Definition at line 78 of file shake.cpp.
References Botan::zeroise().
|
inlineinherited |
|
overridevirtual |
Return a new hash object with the same state as *this. This allows computing the hash of several messages with a common prefix more efficiently than would otherwise be possible.
This function should be called clone
but that was already used for the case of returning an uninitialized object.
Implements Botan::HashFunction.
Definition at line 73 of file shake.cpp.
|
staticinherited |
Create an instance based on a name, or return null if the algo/provider combination cannot be found. If provider is empty then best available is chosen.
Definition at line 98 of file hash.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), Botan::SCAN_Name::arg_count(), Botan::HashFunction::create(), hash, Botan::make_commoncrypto_hash(), and Botan::HashFunction::provider().
Referenced by botan_hash_init(), botan_pubkey_fingerprint(), Botan::EME::create(), Botan::EMSA::create(), Botan::BlockCipher::create(), Botan::HashFunction::create(), Botan::KDF::create(), Botan::MessageAuthenticationCode::create(), Botan::PBKDF::create(), Botan::PasswordHashFamily::create(), Botan::HashFunction::create_or_throw(), Botan::Certificate_Store_In_Memory::find_cert_by_pubkey_sha1(), Botan::Certificate_Store_In_Memory::find_cert_by_raw_subject_dn_sha256(), and Botan::X942_PRF::kdf().
|
staticinherited |
Create an instance based on a name If provider is empty then best available is chosen.
algo_spec | algorithm name |
provider | provider implementation to use Throws Lookup_Error if not found. |
Definition at line 312 of file hash.cpp.
References Botan::HashFunction::create(), hash, and Botan::HashFunction::provider().
Referenced by botan_pubkey_sm2_compute_za(), Botan::OCSP::CertID::CertID(), Botan::TLS::Client_Hello::Client_Hello(), Botan::create_hex_fingerprint(), Botan::Sodium::crypto_hash_sha256(), Botan::Sodium::crypto_hash_sha512(), Botan::Bcrypt_PBKDF::derive_key(), Botan::EMSA_PKCS1v15_Raw::EMSA_PKCS1v15_Raw(), Botan::expand_message_xmd(), Botan::TLS::Handshake_Hash::final(), Botan::Kyber_Modern_Symmetric_Primitives::G(), Botan::Kyber_90s_Symmetric_Primitives::G(), Botan::generate_dsa_primes(), Botan::generate_srp6_verifier(), Botan::Kyber_Modern_Symmetric_Primitives::H(), Botan::Kyber_90s_Symmetric_Primitives::H(), Botan::OCSP::CertID::is_id_for(), Botan::Kyber_Modern_Symmetric_Primitives::KDF(), Botan::Kyber_90s_Symmetric_Primitives::KDF(), Botan::TLS::make_hello_random(), Botan::newhope_shareda(), Botan::newhope_sharedb(), Botan::Roughtime::nonce_from_blind(), Botan::TLS::Transcript_Hash_State::set_algorithm(), Botan::srp6_client_agree(), Botan::SRP6_Server_Session::step1(), Botan::SRP6_Server_Session::step2(), and Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID().
|
inlineinherited |
Complete the computation and retrieve the final result.
Definition at line 90 of file buf_comp.h.
|
inlineinherited |
Definition at line 105 of file buf_comp.h.
|
inlineinherited |
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 83 of file buf_comp.h.
Referenced by botan_mac_final(), Botan::ed25519_gen_keypair(), Botan::ed25519_sign(), Botan::ed25519_verify(), Botan::TLS::TLS_CBC_HMAC_AEAD_Encryption::finish(), Botan::TLS::TLS_CBC_HMAC_AEAD_Decryption::finish(), Botan::pbkdf2(), and Botan::Kyber_Modern_Symmetric_Primitives::PRF().
|
inlineinherited |
Definition at line 97 of file buf_comp.h.
|
inlineoverridevirtual |
Reimplemented from Botan::HashFunction.
Definition at line 62 of file shake.h.
|
overridevirtual |
Implements Botan::HashFunction.
Definition at line 63 of file shake.cpp.
References Botan::ASN1::to_string().
|
overridevirtual |
Implements Botan::HashFunction.
Definition at line 68 of file shake.cpp.
|
inlineoverridevirtual |
Implements Botan::Buffered_Computation.
Definition at line 63 of file shake.h.
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process |
Definition at line 130 of file buf_comp.h.
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a string |
Definition at line 154 of file buf_comp.h.
References update.
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process |
Definition at line 142 of file buf_comp.h.
|
inlineinherited |
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 118 of file buf_comp.h.
|
inlinevirtualinherited |
Reimplemented in Botan::SHA_224, Botan::SHA_256, Botan::SHA_384, Botan::SHA_512, Botan::SHA_512_256, and Botan::SHA_3.
Definition at line 53 of file hash.h.
Referenced by Botan::HashFunction::create(), and Botan::HashFunction::create_or_throw().
|
staticinherited |
|
inlineinherited |
Add new input to process.
in | the input to process as a secure_vector |
Definition at line 39 of file buf_comp.h.
|
inlineinherited |
Add new input to process.
str | the input to process as a std::string. Will be interpreted as a byte array based on the strings encoding. |
Definition at line 66 of file buf_comp.h.
References Botan::cast_char_ptr_to_uint8().
|
inlineinherited |
Add new input to process.
in | the input to process as a std::vector |
Definition at line 48 of file buf_comp.h.
|
inlineinherited |
Add new input to process.
in | the input to process as a byte array |
length | of param in in bytes |
Definition at line 33 of file buf_comp.h.
Referenced by botan_mac_update(), Botan::ed25519_gen_keypair(), Botan::ed25519_sign(), Botan::ed25519_verify(), Botan::TLS::TLS_CBC_HMAC_AEAD_Encryption::finish(), Botan::TLS::TLS_CBC_HMAC_AEAD_Decryption::finish(), Botan::pbkdf2(), and Botan::Kyber_Modern_Symmetric_Primitives::PRF().
|
inlineinherited |
Process a single byte.
in | the byte to process |
Definition at line 75 of file buf_comp.h.
|
inherited |
Definition at line 12 of file buf_comp.cpp.
References Botan::store_be().
Referenced by Botan::pbkdf2().
|
inherited |
Definition at line 19 of file buf_comp.cpp.
References Botan::store_be().
|
inherited |
Definition at line 26 of file buf_comp.cpp.
References Botan::store_be().
|
inherited |
Definition at line 33 of file buf_comp.cpp.
References Botan::store_le().
|
inherited |
Definition at line 40 of file buf_comp.cpp.
References Botan::store_le().
|
inherited |
Definition at line 47 of file buf_comp.cpp.
References Botan::store_le().