Botan
2.1.0
Crypto and TLS for C++11
|
#include <sym_algo.h>
Public Member Functions | |
virtual void | clear ()=0 |
virtual Key_Length_Specification | key_spec () const =0 |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
virtual std::string | name () const =0 |
void | set_key (const SymmetricKey &key) |
template<typename Alloc > | |
void | set_key (const std::vector< uint8_t, Alloc > &key) |
void | set_key (const uint8_t key[], size_t length) |
bool | valid_keylength (size_t length) const |
virtual | ~SymmetricAlgorithm () |
This class represents a symmetric algorithm object.
Definition at line 21 of file sym_algo.h.
|
inlinevirtual |
Definition at line 24 of file sym_algo.h.
|
pure virtual |
Reset the state.
Implemented in Botan::GHASH, Botan::AES_256, Botan::Camellia_256, Botan::GOST_28147_89, Botan::AES_192, Botan::SHAKE_128_Cipher, Botan::ChaCha, Botan::Camellia_192, Botan::TripleDES, Botan::CTR_BE, Botan::OFB, Botan::Lion, Botan::Salsa20, Botan::Cascade_Cipher, Botan::Blowfish, Botan::Poly1305, Botan::Threefish_512, Botan::CMAC, Botan::GMAC, Botan::RC4, Botan::Noekeon, Botan::Serpent, Botan::CBC_MAC, Botan::AES_128, Botan::Camellia_128, Botan::CAST_128, Botan::CAST_256, Botan::DES, Botan::DESX, Botan::IDEA, Botan::KASUMI, Botan::MISTY1, Botan::SEED, Botan::Twofish, Botan::XTEA, Botan::HMAC, Botan::ANSI_X919_MAC, and Botan::SipHash.
Referenced by botan_block_cipher_clear(), botan_mac_clear(), and Botan::TLS::TLS_CBC_HMAC_AEAD_Mode::clear().
|
pure virtual |
Implemented in Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD >, Botan::Block_Cipher_Fixed_Params< 16, 32 >, Botan::Block_Cipher_Fixed_Params< 8, 1, 56 >, Botan::Block_Cipher_Fixed_Params< 8, 32 >, Botan::Block_Cipher_Fixed_Params< 16, 16 >, Botan::Block_Cipher_Fixed_Params< 8, 11, 16 >, Botan::Block_Cipher_Fixed_Params< 8, 16, 24, 8 >, Botan::Block_Cipher_Fixed_Params< 16, 16, 32, 8 >, Botan::Block_Cipher_Fixed_Params< 16, 4, 32, 4 >, Botan::Block_Cipher_Fixed_Params< 64, 64 >, Botan::Block_Cipher_Fixed_Params< 16, 24 >, Botan::Block_Cipher_Fixed_Params< 8, 16 >, Botan::Block_Cipher_Fixed_Params< 8, 8 >, Botan::Block_Cipher_Fixed_Params< 8, 24 >, Botan::GHASH, Botan::GMAC, Botan::SHAKE_128_Cipher, Botan::ChaCha, Botan::Lion, Botan::Poly1305, Botan::RC4, Botan::CTR_BE, Botan::OFB, Botan::CMAC, Botan::HMAC, Botan::ANSI_X919_MAC, Botan::Salsa20, Botan::CBC_MAC, Botan::SipHash, and Botan::Cascade_Cipher.
Referenced by Botan::CBC_Mode::key_spec(), Botan::CFB_Mode::key_spec(), and Botan::XTS_Mode::key_spec().
|
inline |
Definition at line 39 of file sym_algo.h.
|
inline |
Definition at line 47 of file sym_algo.h.
|
pure virtual |
Implemented in Botan::GHASH, Botan::AES_256, Botan::Camellia_256, Botan::AES_192, Botan::GOST_28147_89, Botan::SHAKE_128_Cipher, Botan::ChaCha, Botan::Camellia_192, Botan::TripleDES, Botan::Lion, Botan::CTR_BE, Botan::OFB, Botan::Salsa20, Botan::Cascade_Cipher, Botan::Blowfish, Botan::Threefish_512, Botan::AES_128, Botan::IDEA, Botan::Serpent, Botan::GMAC, Botan::RC4, Botan::Noekeon, Botan::Camellia_128, Botan::CAST_128, Botan::CAST_256, Botan::DES, Botan::DESX, Botan::KASUMI, Botan::MISTY1, Botan::SEED, Botan::Twofish, Botan::XTEA, Botan::HMAC, Botan::Poly1305, Botan::ANSI_X919_MAC, Botan::CBC_MAC, Botan::CMAC, and Botan::SipHash.
Referenced by Botan::CBC_Mode::CBC_Mode(), Botan::XTS_Mode::name(), Botan::CFB_Mode::name(), Botan::CBC_Mode::name(), Botan::pbkdf2(), and Botan::XTS_Mode::XTS_Mode().
|
inline |
Set the symmetric key of this object.
key | the SymmetricKey to be set. |
Definition at line 66 of file sym_algo.h.
References Botan::OctetString::begin(), and Botan::OctetString::length().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), botan_block_cipher_set_key(), botan_mac_set_key(), and Botan::pbkdf2().
|
inline |
Definition at line 72 of file sym_algo.h.
|
inline |
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 82 of file sym_algo.h.
|
inline |
Check whether a given key length is valid for this algorithm.
length | the key length to be checked. |
Definition at line 57 of file sym_algo.h.
Referenced by Botan::aont_package(), and Botan::aont_unpackage().