|
feisty meow concerns codebase 2.140
|
#include <twofish_crypto.h>


Public Member Functions | |
| twofish_crypto (int key_size) | |
| this will create a new random key of the "key_size", in bits. | |
| twofish_crypto (const basis::byte_array &key, int key_size) | |
| uses a pre-existing "key". | |
| twofish_crypto (const twofish_crypto &to_copy) | |
| copy constructor. | |
| virtual | ~twofish_crypto () |
| twofish_crypto & | operator= (const twofish_crypto &to_copy) |
| DEFINE_CLASS_NAME ("twofish_crypto") | |
| virtual int | minimum_key_size_in_bits () const |
| returns the minimum key size in bits supported here. | |
| virtual int | maximum_key_size_in_bits () const |
| returns the maximum key size in bits supported here. | |
Public Member Functions inherited from crypto::cryptical_envelopment | |
| cryptical_envelopment (const EVP_CIPHER *cipher_type) | |
| constructor requires the type of encryption to use. | |
| cryptical_envelopment (const cryptical_envelopment &to_copy) | |
| copy constructor. | |
| virtual | ~cryptical_envelopment () |
| cryptical_envelopment & | operator= (const cryptical_envelopment &to_copy) |
| bool | set_key (int key_size) |
| this will create a new random key of the "key_size", in bits. | |
| bool | set_key (const basis::byte_array &new_key, int key_size) |
| sets the encryption key to "new_key" with a "key_size" in bits. | |
| DEFINE_CLASS_NAME ("cryptical_envelopment") | |
| int | key_size () const |
| const basis::byte_array & | get_key () const |
| returns our current key. | |
| bool | generate_key (int size, basis::byte_array &new_key) |
| creates a "new_key" of the "size" (in bits) specified. | |
| bool | encrypt (const basis::byte_array &source, basis::byte_array &target) const |
| encrypts the "source" array into the "target" array. | |
| bool | decrypt (const basis::byte_array &source, basis::byte_array &target) const |
| decrypts the "target" array from the encrypted "source" array. | |
Public Member Functions inherited from basis::nameable | |
| virtual const char * | class_name () const =0 |
| Returns the bare name of this class as a constant character pointer. | |
Static Public Member Functions | |
| static int | static_minimum_key_size_in_bits () |
| static int | static_maximum_key_size_in_bits () |
Static Public Member Functions inherited from crypto::cryptical_envelopment | |
| static const basis::byte_array & | init_vector () |
| returns the initialization vector that is used by this class. | |
Definition at line 24 of file twofish_crypto.h.
| crypto::twofish_crypto::twofish_crypto | ( | int | key_size | ) |
this will create a new random key of the "key_size", in bits.
the valid sizes are from 128 bits to 256 bits. AES apparently only requires that 128, 192 and 256 actually work, but the intervening key sizes should be fine also.
Definition at line 55 of file twofish_crypto.cpp.
References crypto::cryptical_envelopment::key_size(), and crypto::cryptical_envelopment::set_key().
| crypto::twofish_crypto::twofish_crypto | ( | const basis::byte_array & | key, |
| int | key_size | ||
| ) |
uses a pre-existing "key".
Definition at line 61 of file twofish_crypto.cpp.
References crypto::cryptical_envelopment::key_size(), and crypto::cryptical_envelopment::set_key().
| crypto::twofish_crypto::twofish_crypto | ( | const twofish_crypto & | to_copy | ) |
copy constructor.
Definition at line 67 of file twofish_crypto.cpp.
|
virtual |
Definition at line 73 of file twofish_crypto.cpp.
| crypto::twofish_crypto::DEFINE_CLASS_NAME | ( | "twofish_crypto" | ) |
|
inlinevirtual |
returns the maximum key size in bits supported here.
Implements crypto::cryptical_envelopment.
Definition at line 46 of file twofish_crypto.h.
References static_maximum_key_size_in_bits().
|
inlinevirtual |
returns the minimum key size in bits supported here.
Implements crypto::cryptical_envelopment.
Definition at line 45 of file twofish_crypto.h.
References static_minimum_key_size_in_bits().
| twofish_crypto & crypto::twofish_crypto::operator= | ( | const twofish_crypto & | to_copy | ) |
Definition at line 77 of file twofish_crypto.cpp.
|
inlinestatic |
Definition at line 55 of file twofish_crypto.h.
Referenced by octopi::encryption_tentacle::consume(), and maximum_key_size_in_bits().
|
inlinestatic |
Definition at line 47 of file twofish_crypto.h.
Referenced by minimum_key_size_in_bits().