10
NAMESPACE_BEGIN(CryptoPP)
13
struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 255>, public VariableRounds<20>
15
static const char *StaticAlgorithmName() {return "RC6";}
16
typedef word32 RC6_WORD;
19
/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC6">RC6</a>
20
class RC6 : public RC6_Info, public BlockCipherDocumentation
22
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC6_Info>
25
void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms);
28
unsigned int r; // number of rounds
29
SecBlock<RC6_WORD> sTable; // expanded key table
32
class CRYPTOPP_NO_VTABLE Enc : public Base
35
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
38
class CRYPTOPP_NO_VTABLE Dec : public Base
41
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
45
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
46
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
49
typedef RC6::Encryption RC6Encryption;
50
typedef RC6::Decryption RC6Decryption;