#include <hash.h>

Public Member Functions | |
| virtual void | clear ()=0 |
| virtual HashFunction * | clone () const =0 |
| SecureVector< byte > | final () |
| void | final (byte out[]) |
| HashFunction (u32bit hash_len, u32bit block_len=0) | |
| virtual std::string | name () const =0 |
| SecureVector< byte > | process (const std::string &in) |
| SecureVector< byte > | process (const MemoryRegion< byte > &in) |
| SecureVector< byte > | process (const byte in[], u32bit length) |
| void | update (byte in) |
| void | update (const std::string &str) |
| void | update (const MemoryRegion< byte > &in) |
| void | update (const byte in[], u32bit length) |
| virtual | ~HashFunction () |
Public Attributes | |
| const u32bit | HASH_BLOCK_SIZE |
| const u32bit | OUTPUT_LENGTH |
Definition at line 19 of file hash.h.
| hash_len | the output length | |
| block_len | the internal block size (if applicable) |
Definition at line 47 of file hash.h.
00047 : 00048 BufferedComputation(hash_len), HASH_BLOCK_SIZE(block_len) {}
| virtual Botan::HashFunction::~HashFunction | ( | ) | [inline, virtual] |
| virtual void Botan::HashFunction::clear | ( | ) | [pure virtual] |
Reset the internal state of this object.
Implemented in Botan::Adler32, Botan::CRC24, Botan::CRC32, Botan::BMW_512, Botan::Comb4P, Botan::GOST_34_11, Botan::HAS_160, Botan::MD2, Botan::MD4, Botan::MD5, Botan::MDx_HashFunction, Botan::Parallel, Botan::RIPEMD_128, Botan::RIPEMD_160, Botan::SHA_160, Botan::SHA_224, Botan::SHA_256, Botan::SHA_384, Botan::SHA_512, Botan::Skein_512, Botan::Tiger, and Botan::Whirlpool.
Referenced by Botan::SSL3_MAC::clear(), Botan::HMAC::clear(), Botan::Comb4P::clear(), Botan::LubyRackoff::clear(), Botan::Lion::clear(), and Botan::OpenPGP_S2K::derive_key().
| virtual HashFunction* Botan::HashFunction::clone | ( | ) | const [pure virtual] |
Get a new object representing the same algorithm as *this
Implemented in Botan::Adler32, Botan::CRC24, Botan::CRC32, Botan::BMW_512, Botan::Comb4P, Botan::GOST_34_11, Botan::HAS_160, Botan::MD2, Botan::MD4, Botan::MD4_IA32, Botan::MD5, Botan::MD5_IA32, Botan::Parallel, Botan::RIPEMD_128, Botan::RIPEMD_160, Botan::SHA_160, Botan::SHA_160_AMD64, Botan::SHA_160_IA32, Botan::SHA_160_SSE2, Botan::SHA_224, Botan::SHA_256, Botan::SHA_384, Botan::SHA_512, Botan::Skein_512, Botan::Tiger, and Botan::Whirlpool.
Referenced by Botan::SSL3_MAC::clone(), Botan::HMAC::clone(), Botan::LubyRackoff::clone(), Botan::Lion::clone(), Botan::EMSA4::EMSA4(), Botan::Core_Engine::find_block_cipher(), Botan::Core_Engine::find_hash(), Botan::get_pbe(), and Botan::Algorithm_Factory::make_hash_function().
| SecureVector<byte> Botan::BufferedComputation::final | ( | ) | [inline, inherited] |
Complete the computation and retrieve the final result.
Definition at line 72 of file buf_comp.h.
00073 { 00074 SecureVector<byte> output(OUTPUT_LENGTH); 00075 final_result(output); 00076 return output; 00077 }
| void Botan::BufferedComputation::final | ( | byte | out[] | ) | [inline, inherited] |
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 65 of file buf_comp.h.
Referenced by Botan::LubyRackoff::decrypt_n(), Botan::Lion::decrypt_n(), Botan::X942_PRF::derive(), Botan::KDF2::derive(), Botan::KDF1::derive(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF2::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::EMSA2::EMSA2(), Botan::LubyRackoff::encrypt_n(), Botan::Lion::encrypt_n(), Botan::MAC_Filter::end_msg(), Botan::Hash_Filter::end_msg(), Botan::HandshakeHash::final(), Botan::HandshakeHash::final_ssl3(), Botan::MGF1::mask(), Botan::EMSA3::raw_data(), Botan::Randpool::reseed(), and Botan::HMAC_RNG::reseed().
| virtual std::string Botan::HashFunction::name | ( | ) | const [pure virtual] |
Get the name of this algorithm.
Implemented in Botan::Adler32, Botan::CRC24, Botan::CRC32, Botan::BMW_512, Botan::Comb4P, Botan::GOST_34_11, Botan::HAS_160, Botan::MD2, Botan::MD4, Botan::MD5, Botan::Parallel, Botan::RIPEMD_128, Botan::RIPEMD_160, Botan::SHA_160, Botan::SHA_224, Botan::SHA_256, Botan::SHA_384, Botan::SHA_512, Botan::Skein_512, Botan::Tiger, and Botan::Whirlpool.
Referenced by Botan::Algorithm_Factory::add_hash_function(), Botan::choose_sig_format(), Botan::Comb4P::Comb4P(), Botan::EMSA2::EMSA2(), Botan::EMSA3::EMSA3(), Botan::HMAC::HMAC(), Botan::PBE_PKCS5v20::name(), Botan::PBE_PKCS5v15::name(), Botan::SSL3_MAC::name(), Botan::HMAC::name(), Botan::LubyRackoff::name(), Botan::Lion::name(), Botan::PBE_PKCS5v15::PBE_PKCS5v15(), Botan::PBE_PKCS5v20::PBE_PKCS5v20(), and Botan::SSL3_MAC::SSL3_MAC().
| SecureVector<byte> Botan::BufferedComputation::process | ( | const std::string & | in | ) | [inline, inherited] |
| SecureVector<byte> Botan::BufferedComputation::process | ( | const MemoryRegion< byte > & | in | ) | [inline, inherited] |
Update and finalize computation. Does the same as calling update() and final() consecutively.
| in | the input to process |
Definition at line 98 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
| SecureVector<byte> Botan::BufferedComputation::process | ( | const byte | in[], | |
| u32bit | length | |||
| ) | [inline, inherited] |
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 86 of file buf_comp.h.
Referenced by Botan::Randpool::add_entropy(), Botan::EME1::EME1(), Botan::RTSS_Share::split(), and Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID().
| void Botan::BufferedComputation::update | ( | byte | in | ) | [inline, inherited] |
| void Botan::BufferedComputation::update | ( | const std::string & | str | ) | [inline, inherited] |
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 48 of file buf_comp.h.
| void Botan::BufferedComputation::update | ( | const MemoryRegion< byte > & | in | ) | [inline, inherited] |
Add new input to process.
| in | the input to process as a MemoryRegion |
Definition at line 40 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
Add new input to process.
| in | the input to process as a byte array | |
| length | of param in in bytes |
Definition at line 34 of file buf_comp.h.
Referenced by Botan::HMAC_RNG::add_entropy(), Botan::Comb4P::clear(), Botan::LubyRackoff::decrypt_n(), Botan::Lion::decrypt_n(), Botan::X942_PRF::derive(), Botan::KDF2::derive(), Botan::KDF1::derive(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF2::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::LubyRackoff::encrypt_n(), Botan::Lion::encrypt_n(), Botan::HandshakeHash::final(), Botan::HandshakeHash::final_ssl3(), Botan::MGF1::mask(), Botan::HMAC_RNG::reseed(), Botan::EAX_Base::start_msg(), Botan::EMSA3::update(), and Botan::MAC_Filter::write().
The hash block size as defined for this algorithm.
Definition at line 25 of file hash.h.
Referenced by Botan::MDx_HashFunction::add_data(), Botan::SHA_160::compress_n(), Botan::MD5::compress_n(), Botan::MD4::compress_n(), Botan::MDx_HashFunction::final_result(), Botan::HMAC::HMAC(), Botan::MDx_HashFunction::MDx_HashFunction(), and Botan::SSL3_MAC::SSL3_MAC().
const u32bit Botan::BufferedComputation::OUTPUT_LENGTH [inherited] |
The length of the output of this function in bytes.
Definition at line 27 of file buf_comp.h.
Referenced by Botan::choose_sig_format(), Botan::CMAC::CMAC(), Botan::Comb4P::Comb4P(), Botan::SHA_160::copy_out(), Botan::MD5::copy_out(), Botan::MD4::copy_out(), Botan::LubyRackoff::decrypt_n(), Botan::SSL3_PRF::derive(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF2::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::EAX_Base::EAX_Base(), Botan::EMSA3::encoding_of(), Botan::LubyRackoff::encrypt_n(), Botan::HMAC_RNG::HMAC_RNG(), Botan::MDx_HashFunction::MDx_HashFunction(), Botan::Tiger::name(), Botan::output_length_of(), Botan::Randpool::Randpool(), Botan::Tiger::Tiger(), and Botan::EMSA3::verify().
1.5.8