|
Botan 1.10.17
|
#include <cbc_mac.h>
Public Member Functions | |
| CBC_MAC (BlockCipher *cipher) | |
| void | clear () |
| MessageAuthenticationCode * | clone () const |
| SecureVector< byte > | final () |
| void | final (byte out[]) |
| Key_Length_Specification | key_spec () const |
| size_t | maximum_keylength () const |
| size_t | minimum_keylength () const |
| std::string | name () const |
| size_t | output_length () const |
| SecureVector< byte > | process (const byte in[], size_t length) |
| SecureVector< byte > | process (const MemoryRegion< byte > &in) |
| SecureVector< byte > | process (const std::string &in) |
| void | set_key (const byte key[], size_t length) |
| void | set_key (const SymmetricKey &key) |
| void | update (byte in) |
| void | update (const byte in[], size_t length) |
| void | update (const MemoryRegion< byte > &in) |
| void | update (const std::string &str) |
| template<typename T> | |
| void | update_be (const T in) |
| bool | valid_keylength (size_t length) const |
| virtual bool | verify_mac (const byte in[], size_t length) |
| ~CBC_MAC () | |
| Botan::CBC_MAC::CBC_MAC | ( | BlockCipher * | cipher | ) |
| cipher | the underlying block cipher to use |
Definition at line 91 of file cbc_mac.cpp.
Referenced by clone(), and Botan::Core_Engine::find_mac().
| Botan::CBC_MAC::~CBC_MAC | ( | ) |
Definition at line 100 of file cbc_mac.cpp.
|
virtual |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 65 of file cbc_mac.cpp.
References Botan::zeroise().
|
virtual |
Get a new object representing the same algorithm as *this
Implements Botan::MessageAuthenticationCode.
Definition at line 83 of file cbc_mac.cpp.
References CBC_MAC().
|
inlineinherited |
Complete the computation and retrieve the final result.
Definition at line 87 of file buf_comp.h.
References output_length().
|
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 80 of file buf_comp.h.
Referenced by Botan::X942_PRF::derive(), Botan::HandshakeHash::final(), and Botan::HandshakeHash::final_ssl3().
|
inlinevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 27 of file cbc_mac.h.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
References key_spec().
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
References key_spec().
|
virtual |
Get the name of this algorithm.
Implements Botan::MessageAuthenticationCode.
Definition at line 75 of file cbc_mac.cpp.
|
inlinevirtual |
Implements Botan::Buffered_Computation.
Definition at line 24 of file cbc_mac.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 101 of file buf_comp.h.
Referenced by Botan::EME1::EME1(), Botan::RTSS_Share::split(), and Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID().
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
| in | the input to process |
Definition at line 113 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
|
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 125 of file buf_comp.h.
References update().
|
inlineinherited |
Set the symmetric key of this object.
| key | the to be set as a byte array. |
| length | in bytes of key param |
Definition at line 68 of file sym_algo.h.
References Botan::Algorithm::name(), and valid_keylength().
|
inlineinherited |
Set the symmetric key of this object.
| key | the SymmetricKey to be set. |
Definition at line 60 of file sym_algo.h.
References Botan::OctetString::begin(), Botan::OctetString::length(), and set_key().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::MAC_Filter::MAC_Filter(), Botan::MAC_Filter::MAC_Filter(), Botan::EAX_Base::set_key(), set_key(), Botan::Record_Reader::set_keys(), Botan::Record_Writer::set_keys(), Botan::StreamCipher_Filter::StreamCipher_Filter(), and Botan::StreamCipher_Filter::StreamCipher_Filter().
|
inlineinherited |
Process a single byte.
| in | the byte to process |
Definition at line 72 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::X942_PRF::derive(), Botan::HandshakeHash::final(), Botan::HandshakeHash::final_ssl3(), process(), and Botan::EAX_Base::start_msg().
|
inlineinherited |
Add new input to process.
| in | the input to process as a MemoryRegion |
Definition at line 39 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
|
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 63 of file buf_comp.h.
|
inlineinherited |
Add an integer in big-endian order
| in | the value |
Definition at line 48 of file buf_comp.h.
References Botan::get_byte().
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
| length | the key length to be checked. |
Definition at line 51 of file sym_algo.h.
References key_spec().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), set_key(), and Botan::EAX_Base::valid_keylength().
|
virtualinherited |
Verify a MAC.
| in | the MAC to verify as a byte array |
| length | the length of param in |
Definition at line 16 of file mac.cpp.
References Botan::same_mem(), and Botan::MemoryRegion< T >::size().