aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/camellia/camellia.h
blob: 7795f1fcfdfd33b1aebc46dcf657153b98f4d34f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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