Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cHashCrypt.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cHashCrypt_H
6 #define _INC_cHashCrypt_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 
11 #include "cHashCode.h"
12 
13 namespace GrayLib
14 {
15  class GRAYLIB_LINK cHashCrypt // : public cHashBase
16  {
26 
27  public:
28  // The C and D arrays used to calculate the key schedule.
29  char m_C[28];
30  char m_D[28];
31 
32  // The key schedule. Generated from the key.
33  char m_KS[16][48];
34  char m_E[48];
35 
36  // The current block, divided into 2 halves.
37  char m_L[32];
38  char m_R[32];
39  char m_tempL[32];
40  char m_f[32];
41 
42  // The combination of the key and the input, before selection.
43  char m_preS[48];
44 
45  char m_block[66];
46  char m_iobuf[16];
47 
48  public:
49  cHashCrypt();
50  virtual ~cHashCrypt();
51 
52  void setkey(const char* pKey);
53  void encrypt(char* block, int edflag);
54  char* crypt(const char* pw, const char* salt);
55  };
56 };
57 
58 #endif
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cHashCrypt.h:16
Definition: cMesh.h:22