00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __ENCRYPTION_H__
00012 #define __ENCRYPTION_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 namespace RNReplicaNet
00016 {
00017
00018
00019 const int kEncryptionKeyLengthBytes = 8;
00020
00024 class REPNETEXPORTAPI Encryption
00025 {
00026 public:
00027 struct REPNETEXPORTAPI Key
00028 {
00029 public:
00030 Key();
00031 virtual ~Key();
00032
00038 void Create(void *data,int length);
00039
00040 unsigned char mKey[kEncryptionKeyLengthBytes];
00041 };
00042
00049 static void Encrypt(void *data,int length,Key *key);
00050
00057 static void Decrypt(void *data,int length,Key *key);
00058 };
00059
00060 }
00061
00062 #endif