mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 14:16:10 -06:00
31 lines
479 B
C++
31 lines
479 B
C++
#ifndef _TestProtec_RC4_h_
|
|
#define _TestProtec_RC4_h_
|
|
|
|
#include <Core/Core.h>
|
|
|
|
NAMESPACE_UPP
|
|
|
|
class RC4
|
|
{
|
|
private:
|
|
|
|
byte sbox[256];
|
|
byte si, sj;
|
|
|
|
public:
|
|
|
|
RC4();
|
|
RC4(String const &key);
|
|
RC4(byte const *keyBuf, int keyLen);
|
|
|
|
bool SetKey(String const &key);
|
|
bool SetKey(byte const *keyBuf, int keyLen);
|
|
|
|
void Encode(const byte *src, byte *dst, size_t len);
|
|
void Encode(byte *buf, size_t len);
|
|
String Encode(String const &s);
|
|
};
|
|
|
|
END_UPP_NAMESPACE
|
|
|
|
#endif
|