Botan
1.10.9
|
#include <arc4.h>
Public Member Functions | |
ARC4 (size_t skip=0) | |
void | cipher (const byte in[], byte out[], size_t length) |
void | cipher1 (byte buf[], size_t len) |
void | clear () |
StreamCipher * | clone () const |
Key_Length_Specification | key_spec () const |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
std::string | name () const |
virtual void | set_iv (const byte iv[], size_t iv_len) |
void | set_key (const SymmetricKey &key) |
void | set_key (const byte key[], size_t length) |
virtual bool | valid_iv_length (size_t iv_len) const |
bool | valid_keylength (size_t length) const |
~ARC4 () | |
Botan::ARC4::ARC4 | ( | size_t | skip = 0 | ) |
Encrypt or decrypt a message
in | the plaintext |
out | the byte array to hold the output, i.e. the ciphertext |
len | the length of both in and out in bytes |
Implements Botan::StreamCipher.
Definition at line 17 of file arc4.cpp.
References Botan::MemoryRegion< T >::size(), and Botan::xor_buf().
|
inlineinherited |
Encrypt or decrypt a message
buf | the plaintext / ciphertext |
len | the length of buf in bytes |
Definition at line 34 of file stream_cipher.h.
Referenced by Botan::Lion::decrypt_n(), and Botan::Lion::encrypt_n().
|
virtual |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 94 of file arc4.cpp.
References Botan::zeroise().
Referenced by ARC4().
|
inlinevirtual |
Get a new object representing the same algorithm as *this
Implements Botan::StreamCipher.
Definition at line 27 of file arc4.h.
References SKIP.
|
inlinevirtual |
Implements Botan::SymmetricAlgorithm.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
|
virtual |
Implements Botan::Algorithm.
Definition at line 84 of file arc4.cpp.
References Botan::to_string().
|
virtualinherited |
Resync the cipher using the IV
iv | the initialization vector |
iv_len | the length of the IV in bytes |
Reimplemented in Botan::WiderWake_41_BE, Botan::CTR_BE, Botan::OFB, Botan::Salsa20, and Botan::Turing.
Definition at line 12 of file stream_cipher.cpp.
References Botan::Algorithm::name().
Referenced by Botan::EAX_Base::set_iv(), and Botan::StreamCipher_Filter::set_iv().
|
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(), and Botan::OctetString::length().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::Lion::decrypt_n(), Botan::PKCS5_PBKDF2::derive_key(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), Botan::Lion::encrypt_n(), Botan::HMAC_RNG::HMAC_RNG(), Botan::MAC_Filter::MAC_Filter(), Botan::HMAC_RNG::reseed(), Botan::XTS_Encryption::set_key(), Botan::EAX_Base::set_key(), Botan::XTS_Decryption::set_key(), Botan::Record_Writer::set_keys(), Botan::Record_Reader::set_keys(), and Botan::StreamCipher_Filter::StreamCipher_Filter().
|
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.
|
virtualinherited |
iv_len | the length of the IV in bytes |
Reimplemented in Botan::WiderWake_41_BE, Botan::CTR_BE, Botan::OFB, Botan::Salsa20, and Botan::Turing.
Definition at line 19 of file stream_cipher.cpp.
|
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.
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::HMAC_RNG::HMAC_RNG(), Botan::Lion::Lion(), Botan::Randpool::Randpool(), and Botan::EAX_Base::valid_keylength().