diff options
Diffstat (limited to 'src/block/camellia/camellia.h')
-rw-r--r-- | src/block/camellia/camellia.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/block/camellia/camellia.h b/src/block/camellia/camellia.h new file mode 100644 index 000000000..7795f1fcf --- /dev/null +++ b/src/block/camellia/camellia.h @@ -0,0 +1,35 @@ +/* +* Camellia +* (C) 2012 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_CAMELLIA_H__ +#define BOTAN_CAMELLIA_H__ + +#include <botan/block_cipher.h> + +namespace Botan { + +/** +* Camellia +*/ +class BOTAN_DLL Camellia : public Block_Cipher_Fixed_Params<16, 16, 32, 8> + { + public: + void encrypt_n(const byte in[], byte out[], size_t blocks) const; + void decrypt_n(const byte in[], byte out[], size_t blocks) const; + + void clear() { K.clear(); } + std::string name() const { return "Camellia"; } + BlockCipher* clone() const { return new Camellia; } + private: + void key_schedule(const byte key[], size_t length); + + SecureVector<u64bit> K; + }; + +} + +#endif |