Pol  Revision:cb584c9
md5.h
Go to the documentation of this file.
1 //
3 // crypt/md5.h
4 //
6 
7 #ifndef __MD5_H__
8 #define __MD5_H__
9 namespace Pol
10 {
11 namespace Crypt
12 {
13 // Struct for MD5
14 
15 typedef struct tagmd5_state
16 {
17  unsigned int count[2];
18  unsigned int abcd[4];
19  unsigned char buf[64];
20 } md5_state;
21 
22 class MD5Crypt
23 {
24  // Constructor / Destructor
25 public:
26  MD5Crypt();
27  ~MD5Crypt();
28 
29  // Member Functions
30 
31 public:
32  void Init( unsigned char* Data, unsigned int Size );
33  void Encrypt( unsigned char* in, unsigned char* out, int len );
34 
35 protected:
36  static void process( md5_state* pms, const unsigned char* data );
37  static void start( md5_state* pms );
38  static void append( md5_state* pms, const unsigned char* data, int nbytes );
39  static void finish( md5_state* pms, unsigned char digest[16] );
40 
41  unsigned int TableIdx;
42  unsigned char Digest[16];
43 };
44 }
45 }
46 #endif //__MD5_H__
unsigned int count[2]
Definition: md5.h:17
std::unordered_map< u64, ScriptDiffData > data
Definition: osmod.cpp:966
unsigned int abcd[4]
Definition: md5.h:18
unsigned char buf[64]
Definition: md5.h:19
struct Pol::Crypt::tagmd5_state md5_state
unsigned int TableIdx
Definition: md5.h:41
Definition: berror.cpp:12