14NAMESPACE_BEGIN(CryptoPP)
20 CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024);
21 CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024);
22 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return "RC2";}
35 void UncheckedSetKey(
const byte *userKey,
unsigned int length,
const NameValuePairs ¶ms);
36 unsigned int OptimalDataAlignment()
const {
return GetAlignmentOf<word16>();}
44 class CRYPTOPP_NO_VTABLE Enc :
public Base
47 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
52 class CRYPTOPP_NO_VTABLE Dec :
public Base
55 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const;
66 Encryption(
const byte *key,
size_t keyLen=DEFAULT_KEYLENGTH)
67 {SetKey(key, keyLen);}
68 Encryption(
const byte *key,
size_t keyLen,
int effectiveKeyLen)
69 {SetKey(key, keyLen,
MakeParameters(
"EffectiveKeyLength", effectiveKeyLen));}
78 Decryption(
const byte *key,
size_t keyLen=DEFAULT_KEYLENGTH)
79 {SetKey(key, keyLen);}
80 Decryption(
const byte *key,
size_t keyLen,
int effectiveKeyLen)
81 {SetKey(key, keyLen,
MakeParameters(
"EffectiveKeyLength", effectiveKeyLen));}
Classes for working with NameValuePairs.
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed=true)
Create an object that implements NameValuePairs.
Provides class member functions to key a block cipher.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Inherited by algorithms with fixed block size.
Fixed size stack-based SecBlock.
Interface for retrieving values given their names.
Class specific methods used to operate the cipher in the reverse direction.
Class specific methods used to operate the cipher in the forward direction.
Inherited by keyed algorithms with variable key length.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
RC2 block cipher information.