Download Source Code

CMd5Rsa Class Reference

RSA MD5 hash class. More...

#include <md5rsa.h>

List of all members.

Public Member Functions

 CMd5Rsa ()
 Default constructor.
 ~CMd5Rsa ()
 Destructor.

Static Public Member Functions

static void MD5 (unsigned char digest[16], const void *input, unsigned int inputLen)
 Updates hash with input data.
static void MD5Init (MD5_CTX *context)
 Initializes an MD5 hash data structure.
static void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
 Updates hash with input data.
static void MD5Final (unsigned char digest[16], MD5_CTX *context)
 Finalizes an MD5 hash data structure.
static void MD5Transform (UINT4 state[4], unsigned char block[64])
 Updates a hash with 64 bytes of input data.
static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
 Encodes a hash into a character string.
static void Decode (UINT4 *output, unsigned char *input, unsigned int len)
 Decodes a hash from a character string.
static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
 Copies data from one buffer to another.
static void MD5_memset (POINTER output, int value, unsigned int len)
 Initializes a memory buffer.
static BOOL vHash (unsigned char digest[16], DWORD dwBuffers, LPVOID *pArgs)
 Updates a hash using variable number of buffers.
static BOOL _cdecl Hash (unsigned char digest[16], DWORD dwBuffers,...)
 Updates a hash using variable number of buffer arguments.


Detailed Description

RSA MD5 hash class.

Calculates the RSA MD5 hash


Member Function Documentation

void CMd5Rsa::Decode UINT4 *  output,
unsigned char *  input,
unsigned int  len
[static]
 

Decodes a hash from a character string.

Parameters:
[out] output - Receives hash value
[in] input - Hash string
[in] len - Number of bytes in input

void CMd5Rsa::Encode unsigned char *  output,
UINT4 *  input,
unsigned int  len
[static]
 

Encodes a hash into a character string.

Parameters:
[out] output - Receives hash string
[in] input - Hash value
[in] len - Size of buffer in output

static BOOL _cdecl CMd5Rsa::Hash unsigned char  digest[16],
DWORD  dwBuffers,
  ...
[inline, static]
 

Updates a hash using variable number of buffer arguments.

Parameters:
[in,out] digest - MD5 hash
[in] dwBuffers - Number of buffers in pArgs
[in] ... - Buffer pointer arguments
... arguments are ( LPVOID, DWORD, etc... )

Where pBuffer is a pointer to an individual buffer and dwSize is the number of bytes in pBuffer.

Returns:
Non-zero if success

void CMd5Rsa::MD5 unsigned char  digest[16],
const void *  input,
unsigned int  inputLen
[static]
 

Updates hash with input data.

Parameters:
[in,out] digest - Pointer to hash
[in] input - Input data
[in] inputLen - Number of bytes in input

void CMd5Rsa::MD5_memcpy POINTER  output,
POINTER  input,
unsigned int  len
[static]
 

Copies data from one buffer to another.

Parameters:
[out] output - Destination buffer
[in] input - Source buffer
[in] len - Number of bytes to copy

void CMd5Rsa::MD5_memset POINTER  output,
int  value,
unsigned int  len
[static]
 

Initializes a memory buffer.

Parameters:
[out] output - Destination buffer
[in] value - Initialization value
[in] len - Number of bytes to initialize

void CMd5Rsa::MD5Final unsigned char  digest[16],
MD5_CTX *  context
[static]
 

Finalizes an MD5 hash data structure.

Parameters:
[in,out] digest - MD5 hash
[in,out] context - Pointer to MD5 hash data structure

void CMd5Rsa::MD5Init MD5_CTX *  context  )  [static]
 

Initializes an MD5 hash data structure.

Parameters:
[out] context - MD5 context data to be initialized

void CMd5Rsa::MD5Transform UINT4  state[4],
unsigned char  block[64]
[static]
 

Updates a hash with 64 bytes of input data.

Parameters:
[in,out] state - hash buffer
[in,out] block - Input data

void CMd5Rsa::MD5Update MD5_CTX *  context,
unsigned char *  input,
unsigned int  inputLen
[static]
 

Updates hash with input data.

Parameters:
[in,out] context - Pointer to MD5 hash data structure
[in] input - Input data
[in] inputLen - Number of bytes in input

BOOL CMd5Rsa::vHash unsigned char  digest[16],
DWORD  dwBuffers,
LPVOID *  pArgs
[static]
 

Updates a hash using variable number of buffers.

Parameters:
[in,out] digest - MD5 hash
[in] dwBuffers - Number of buffers in pArgs
[in] pArgs - Buffer pointer array
Arguments are ( LPVOID pBuffer, DWORD dwSize, etc... )

Where pBuffer is a pointer to an individual buffer and dwSize is the number of bytes in pBuffer.

Returns:
Non-zero if success


The documentation for this class was generated from the following files:
  • inc/md5rsa.h
  • md5rsa.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL