Botan 1.10.17
camellia.h
Go to the documentation of this file.
1/*
2* Camellia
3* (C) 2012 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_CAMELLIA_H__
9#define BOTAN_CAMELLIA_H__
10
11#include <botan/block_cipher.h>
12
13namespace Botan {
14
15/**
16* Camellia-128
17*/
18class BOTAN_DLL Camellia_128 : public Block_Cipher_Fixed_Params<16, 16>
19 {
20 public:
21 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
22 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
23
24 void clear() { SK.clear(); }
25 std::string name() const { return "Camellia-128"; }
26 BlockCipher* clone() const { return new Camellia_128; }
27 private:
28 void key_schedule(const byte key[], size_t length);
29
31 };
32
33/**
34* Camellia-192
35*/
36class BOTAN_DLL Camellia_192 : public Block_Cipher_Fixed_Params<16, 24>
37 {
38 public:
39 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
40 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
41
42 void clear() { SK.clear(); }
43 std::string name() const { return "Camellia-192"; }
44 BlockCipher* clone() const { return new Camellia_192; }
45 private:
46 void key_schedule(const byte key[], size_t length);
47
49 };
50
51/**
52* Camellia-256
53*/
54class BOTAN_DLL Camellia_256 : public Block_Cipher_Fixed_Params<16, 32>
55 {
56 public:
57 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
58 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
59
60 void clear() { SK.clear(); }
61 std::string name() const { return "Camellia-256"; }
62 BlockCipher* clone() const { return new Camellia_256; }
63 private:
64 void key_schedule(const byte key[], size_t length);
65
67 };
68
69}
70
71#endif
std::string name() const
Definition camellia.h:25
void decrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:349
void encrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:334
BlockCipher * clone() const
Definition camellia.h:26
BlockCipher * clone() const
Definition camellia.h:44
void encrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:339
void decrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:354
std::string name() const
Definition camellia.h:43
std::string name() const
Definition camellia.h:61
void encrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:344
void decrypt_n(const byte in[], byte out[], size_t blocks) const
Definition camellia.cpp:359
BlockCipher * clone() const
Definition camellia.h:62