11 NAMESPACE_BEGIN(CryptoPP)
16 CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024)
17 CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024)
18 static const char *StaticAlgorithmName() {
return "RC2";}
27 void UncheckedSetKey(
const byte *userKey,
unsigned int length,
const NameValuePairs ¶ms);
28 unsigned int OptimalDataAlignment()
const {
return GetAlignmentOf<word16>();}
34 class CRYPTOPP_NO_VTABLE Enc :
public Base
37 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
40 class CRYPTOPP_NO_VTABLE Dec :
public Base
43 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const;
51 Encryption(
const byte *key,
size_t keyLen=DEFAULT_KEYLENGTH)
52 {SetKey(key, keyLen);}
53 Encryption(
const byte *key,
size_t keyLen,
int effectiveKeyLen)
54 {SetKey(key, keyLen, MakeParameters(
"EffectiveKeyLength", effectiveKeyLen));}
61 Decryption(
const byte *key,
size_t keyLen=DEFAULT_KEYLENGTH)
62 {SetKey(key, keyLen);}
63 Decryption(
const byte *key,
size_t keyLen,
int effectiveKeyLen)
64 {SetKey(key, keyLen, MakeParameters(
"EffectiveKeyLength", effectiveKeyLen));}