1 #ifndef CRYPTOPP_ARC4_H
2 #define CRYPTOPP_ARC4_H
6 NAMESPACE_BEGIN(CryptoPP)
16 static const char *StaticAlgorithmName() {
return "ARC4";}
21 void ProcessData(byte *outString,
const byte *inString,
size_t length);
31 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms);
32 virtual unsigned int GetDefaultDiscardBytes()
const {
return 0;}
45 static const char *StaticAlgorithmName() {
return "MARC4";}
51 unsigned int GetDefaultDiscardBytes()
const {
return 256;}
58 #if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1
61 using namespace Weak1;
63 #warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning."
65 #pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.")
virtual void DiscardBytes(size_t n)
generate and discard n bytes
interface for random number generators
bool IsForwardTransformation() const
returns whether this is an encryption object
Modified ARC4: it discards the first 256 bytes of keystream which may be weaker than the rest...
interface for one direction (encryption or decryption) of a stream cipher or cipher mode ...
virtual void GenerateBlock(byte *output, size_t size)
generate random array of bytes
SymmetricCipher Decryption
implements the SymmetricCipher interface
support query of variable key length, template parameters are default, min, max, multiple (default mu...
Each class derived from this one defines two types, Encryption and Decryption, both of which implemen...
bool IsSelfInverting() const
returns whether this transformation is self-inverting (e.g. xor with a keystream) ...
SymmetricCipher Encryption
implements the SymmetricCipher interface
bool IsRandomAccess() const
returns whether this cipher supports random access
interface for retrieving values given their names