MD5 Class Reference
This class represents the implementation of the md5 message digest algorithm.
More...
#include <hl_md5.h>
List of all members.
Public Member Functions |
void | MD5Init (HL_MD5_CTX *context) |
| Initialization begins an operation, writing a new context.
|
void | MD5Update (HL_MD5_CTX *context, unsigned char *input, unsigned int inputLen) |
| Block update operation. Continues an md5 message-digest operation, processing another message block, and updating the context.
|
void | MD5Final (unsigned char digest[16], HL_MD5_CTX *context) |
| Finalization ends the md5 message-digest operation, writing the the message digest and zeroizing the context.
|
| MD5 () |
| default constructor
|
Private Member Functions |
void | MD5Transform (unsigned long int state[4], unsigned char block[64]) |
| Basic transformation. Transforms state based on block.
|
void | Encode (unsigned char *output, unsigned long int *input, unsigned int len) |
| Encodes input data.
|
void | Decode (unsigned long int *output, unsigned char *input, unsigned int len) |
| Decodes input data into output.
|
void | MD5_memcpy (POINTER output, POINTER input, unsigned int len) |
| internal memory management
|
void | MD5_memset (POINTER output, int value, unsigned int len) |
| internal memory management
|
Detailed Description
This class represents the implementation of the md5 message digest algorithm.
Basically the class provides three public member-functions to create a hash: MD5Init(), MD5Update() and MD5Final(). If you want to create a hash based on a string or file quickly you should use the md5wrapper class instead of MD5.
Member Function Documentation
void MD5::Decode |
( |
unsigned long int * |
output, |
|
|
unsigned char * |
input, |
|
|
unsigned int |
len | |
|
) |
| | [private] |
Decodes input data into output.
- Parameters:
-
| output | Decoded data as OUT parameter |
| input | Input data |
| len | The length of the input assuming it is a multiple of 4 |
void MD5::Encode |
( |
unsigned char * |
output, |
|
|
unsigned long int * |
input, |
|
|
unsigned int |
len | |
|
) |
| | [private] |
Encodes input data.
- Parameters:
-
| output | Encoded data as OUT parameter |
| input | Input data |
| len | The length of the input assuming it is a multiple of 4 |
void MD5::MD5_memcpy |
( |
POINTER |
output, |
|
|
POINTER |
input, |
|
|
unsigned int |
len | |
|
) |
| | [private] |
internal memory management
- Parameters:
-
| output | OUT parameter where POINTER is an unsigned char* |
| input | Data to copy where POINTER is a unsigned char* |
| len | The length of the data |
| output | OUT parameter where POINTER is a unsigned char* |
| input | Data to copy where POINTER is a unsigned char* |
| len | The length of the data |
void MD5::MD5_memset |
( |
POINTER |
output, |
|
|
int |
value, |
|
|
unsigned int |
len | |
|
) |
| | [private] |
internal memory management
- Parameters:
-
| output | OUT parameter where POINTER is an unsigned char* |
| value | Value to fill the memory with |
| len | The length of the data |
void MD5::MD5Final |
( |
unsigned char |
digest[16], |
|
|
HL_MD5_CTX * |
context | |
|
) |
| | |
Finalization ends the md5 message-digest operation, writing the the message digest and zeroizing the context.
- Parameters:
-
| digest | This is an OUT parameter which contains the created hash after the method returns |
| context | The context to finalize |
Initialization begins an operation, writing a new context.
- Parameters:
-
void MD5::MD5Transform |
( |
unsigned long int |
state[4], |
|
|
unsigned char |
block[64] | |
|
) |
| | [private] |
Basic transformation. Transforms state based on block.
- Parameters:
-
| state | state to transform |
| block | block to transform |
void MD5::MD5Update |
( |
HL_MD5_CTX * |
context, |
|
|
unsigned char * |
input, |
|
|
unsigned int |
inputLen | |
|
) |
| | |
Block update operation. Continues an md5 message-digest operation, processing another message block, and updating the context.
- Parameters:
-
| context | The HL_MD5_CTX context to update |
| input | The data to write into the context |
| inputLen | The length of the input data |
The documentation for this class was generated from the following files:
- /home/bgr/Workspace/hashlib2plus/trunk/src/hl_md5.h
- /home/bgr/Workspace/hashlib2plus/trunk/src/hl_md5.cpp