romulus/Romulus-M/encrypt_wrapper.h

29 lines
572 B
C

#include <stdio.h>
#include "export.h"
#ifdef _MSC_VER
#include <stdint.h>
#define UINT16 uint16_t
#define UINT32 uint32_t
#else
#define UINT16 __uint16_t
#define UINT32 __uint32_t
#endif
typedef struct {
UINT16 DataType;
UINT16 Size;
unsigned char* Data;
}packet;
typedef struct {
UINT16 DataType;
UINT32 Id;
UINT16 Size;
unsigned char* Data;
}packetEx;
EXPORT int encrypt(packet *packet, unsigned char* outBuf, UINT16 *len, unsigned char* key);
EXPORT int decrypt(packetEx *packet, unsigned char* inBuf, UINT16 len, unsigned char* key);