mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
22 lines
530 B
C++
22 lines
530 B
C++
|
|
#ifndef __SOCKET_DATA_ENCRYPTOR_H
|
|
#define __SOCKET_DATA_ENCRYPTOR_H
|
|
|
|
class SocketDataEncryptor
|
|
{
|
|
private:
|
|
static unsigned char GetChecksum(unsigned char *data, int length);
|
|
static void Process(unsigned char key1, unsigned char key2, unsigned char *data, int length);
|
|
|
|
static unsigned short session_key;
|
|
|
|
public:
|
|
static void Encrypt(unsigned char *destination, unsigned char *source, int *length);
|
|
static int Decrypt(unsigned char *destination, unsigned char *source, int *length);
|
|
|
|
static void SetKey(int key);
|
|
|
|
};
|
|
|
|
#endif
|