Crypto++
Main Page
Namespaces
Classes
Files
File List
File Members
camellia.h
Go to the documentation of this file.
1
#ifndef CRYPTOPP_CAMELLIA_H
2
#define CRYPTOPP_CAMELLIA_H
3
4
#include "config.h"
5
6
/** \file
7
*/
8
9
#include "seckey.h"
10
#include "secblock.h"
11
12
NAMESPACE_BEGIN(CryptoPP)
13
14
//! _
15
struct
Camellia_Info
: public
FixedBlockSize
<16>, public
VariableKeyLength
<16, 16, 32, 8>
16
{
17
static
const
char
*StaticAlgorithmName() {
return
"Camellia"
;}
18
};
19
20
/// <a href="http://www.weidai.com/scan-mirror/cs.html#Camellia">Camellia</a>
21
class
Camellia
:
public
Camellia_Info
,
public
BlockCipherDocumentation
22
{
23
class
CRYPTOPP_NO_VTABLE Base :
public
BlockCipherImpl
<Camellia_Info>
24
{
25
public
:
26
void
UncheckedSetKey(
const
byte *key,
unsigned
int
keylen,
const
NameValuePairs
¶ms);
27
void
ProcessAndXorBlock(
const
byte *inBlock,
const
byte *xorBlock, byte *outBlock)
const
;
28
29
protected
:
30
static
const
byte s1[256];
31
static
const
word32 SP[4][256];
32
33
unsigned
int
m_rounds;
34
SecBlock<word32>
m_key;
35
};
36
37
public
:
38
typedef
BlockCipherFinal<ENCRYPTION, Base>
Encryption
;
39
typedef
BlockCipherFinal<DECRYPTION, Base>
Decryption
;
40
};
41
42
typedef
Camellia::Encryption
CamelliaEncryption
;
43
typedef
Camellia::Decryption
CamelliaDecryption
;
44
45
NAMESPACE_END
46
47
#endif
Generated on Sun Jun 28 2015 15:44:09 for Crypto++ by
1.8.1.2