Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cHashCrypt Class Reference

#include <cHashCrypt.h>

Public Member Functions

 cHashCrypt ()
 
virtual ~cHashCrypt ()
 
void setkey (const char *pKey)
 
void encrypt (char *block, int edflag)
 
char * crypt (const char *pw, const char *salt)
 

Public Attributes

char m_C [28]
 
char m_D [28]
 
char m_KS [16][48]
 
char m_E [48]
 
char m_L [32]
 
char m_R [32]
 
char m_tempL [32]
 
char m_f [32]
 
char m_preS [48]
 
char m_block [66]
 
char m_iobuf [16]
 output buffer for crypt(). More...
 

Detailed Description

Implement the linux crypt() function in _WIN32 Only use this for Linux compatible password checks. Not good enough for anything else. http://linux.die.net/man/3/crypt extern char* crypt(const char *key, const char *salt); key = is a user's typed password. salt = a two-character string chosen from the set [a-zA-Z0-9./]. This string is used to perturb the algorithm in one of 4096 different ways. return the encrypted/hashed password, a series of 13 printable ASCII characters (the first two characters represent the salt itself).

Constructor & Destructor Documentation

◆ cHashCrypt()

GrayLib::cHashCrypt::cHashCrypt ( )

◆ ~cHashCrypt()

GrayLib::cHashCrypt::~cHashCrypt ( )
virtual

Member Function Documentation

◆ crypt()

char * GrayLib::cHashCrypt::crypt ( const char *  pw,
const char *  salt 
)

◆ encrypt()

void GrayLib::cHashCrypt::encrypt ( char *  block,
int  edflag 
)

◆ setkey()

void GrayLib::cHashCrypt::setkey ( const char *  pKey)

Set up the key schedule from the key.

Member Data Documentation

◆ m_block

char GrayLib::cHashCrypt::m_block[66]

◆ m_C

char GrayLib::cHashCrypt::m_C[28]

◆ m_D

char GrayLib::cHashCrypt::m_D[28]

◆ m_E

char GrayLib::cHashCrypt::m_E[48]

◆ m_f

char GrayLib::cHashCrypt::m_f[32]

◆ m_iobuf

char GrayLib::cHashCrypt::m_iobuf[16]

output buffer for crypt().

◆ m_KS

char GrayLib::cHashCrypt::m_KS[16][48]

◆ m_L

char GrayLib::cHashCrypt::m_L[32]

◆ m_preS

char GrayLib::cHashCrypt::m_preS[48]

◆ m_R

char GrayLib::cHashCrypt::m_R[32]

◆ m_tempL

char GrayLib::cHashCrypt::m_tempL[32]

The documentation for this class was generated from the following files: