|
libkeepass 0.2.0
KeePass key database importer/exporter library
|
Twofish-256 block cipher implementation. More...
#include <cipher.hh>
Public Member Functions | |
| TwofishCipher (const uint8_t *key) | |
| Constructs a Twofish cipher with a zero initialization vector. | |
| TwofishCipher (const uint8_t *key, const std::array< uint8_t, 16 > &init_vec) | |
| Constructs a Twofish cipher with a given initialization vector. | |
| ~TwofishCipher () | |
| Zeroizes the expanded key schedule. | |
| const std::array< uint8_t, 16 > & | InitializationVector () const override |
| Returns the initialization vector. | |
| void | Decrypt (const std::array< uint8_t, 16 > &src, std::array< uint8_t, 16 > &dst) const override |
| Decrypts a single 16-byte block using Twofish-256. | |
| void | Encrypt (const std::array< uint8_t, 16 > &src, std::array< uint8_t, 16 > &dst) const override |
| Encrypts a single 16-byte block using Twofish-256. | |
Public Member Functions inherited from keepass::Cipher< 16 > | |
| virtual void | Decrypt (const std::array< uint8_t, N > &src, std::array< uint8_t, N > &dst) const=0 |
| Decrypts a single block. | |
| virtual void | Encrypt (const std::array< uint8_t, N > &src, std::array< uint8_t, N > &dst) const=0 |
| Encrypts a single block. | |
Twofish-256 block cipher implementation.
Constructs a Twofish cipher with a zero initialization vector.
| key | The 256-bit (32-byte) encryption key. |
| keepass::TwofishCipher::TwofishCipher | ( | const uint8_t * | key, |
| const std::array< uint8_t, 16 > & | init_vec | ||
| ) |
Constructs a Twofish cipher with a given initialization vector.
| key | The 256-bit (32-byte) encryption key. |
| init_vec | The 16-byte initialization vector. |
|
override |
Decrypts a single 16-byte block using Twofish-256.
| src | The ciphertext block to decrypt. |
| dst | The resulting plaintext block. |
|
override |
Encrypts a single 16-byte block using Twofish-256.
| src | The plaintext block to encrypt. |
| dst | The resulting ciphertext block. |
|
inlineoverridevirtual |
Returns the initialization vector.
Implements keepass::Cipher< 16 >.