Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

Encryption.h

00001 /* START_LICENSE_HEADER
00002 
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005 
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009 
00010 END_LICENSE_HEADER */
00011 #ifndef __ENCRYPTION_H__
00012 #define __ENCRYPTION_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014 
00015 namespace RNReplicaNet
00016 {
00017 
00018 // Key length must be an integer multiple of 4 and be at least 8
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 } // namespace RNReplicaNet
00061 
00062 #endif

Generated on Sun Oct 30 01:12:31 2005 for Platform by  doxygen 1.4.1