The Pedigree Project
0.1
|
This class represents the implementation of the md5 message digest algorithm. More...
#include <md5.h>
Public Member Functions | |
void | Reset () |
Initialization begins an operation, writing a new context. | |
void | Input (unsigned char *input, unsigned int inputLen) |
Block update operation. Continues an md5 message-digest operation, processing another message block, and updating the context. More... | |
void | Result (unsigned char digest[16]) |
Finalization ends the md5 message-digest operation, writing the the message digest and zeroizing the context. More... | |
MD5 () | |
default constructor | |
Private Member Functions | |
void | MD5Transform (unsigned long int state[4], unsigned char block[64]) |
Basic transformation. Transforms state based on block. More... | |
void | Encode (unsigned char *output, unsigned long int *input, unsigned int len) |
Encodes input data. More... | |
void | Decode (unsigned long int *output, unsigned char *input, unsigned int len) |
Decodes input data into output. More... | |
void | MD5_memcpy (POINTER output, POINTER input, unsigned int len) |
internal memory management More... | |
void | MD5_memset (POINTER output, int value, unsigned int len) |
internal memory management More... | |
Private Attributes | |
unsigned long int | state [4] |
unsigned long int | count [2] |
unsigned char | buffer [64] |
This class represents the implementation of the md5 message digest algorithm.
Basically the class provides three public member-functions to create a hash: Reset(), Input() and Result().
Definition at line 84 of file system/include/pedigree/kernel/utilities/md5/md5.h.
|
private |
Decodes input data into output.
output | Decoded data as OUT parameter |
input | Input data |
len | The length of the input assuming it is a multiple of 4 |
Definition at line 266 of file md5.cc.
Referenced by MD5Transform().
|
private |
void MD5::Input | ( | unsigned char * | input, |
unsigned int | inputLen | ||
) |
Block update operation. Continues an md5 message-digest operation, processing another message block, and updating the context.
input | The data to write into the context |
inputLen | The length of the input data |
Definition at line 326 of file md5.cc.
References buffer, count, MD5_memcpy(), MD5Transform(), and state.
Referenced by Result().
|
private |
internal memory management
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 |
Definition at line 285 of file md5.cc.
Referenced by Input().
|
private |
internal memory management
output | OUT parameter where POINTER is an unsigned char* |
value | Value to fill the memory with |
len | The length of the data |
Definition at line 298 of file md5.cc.
Referenced by MD5Transform().
|
private |
Basic transformation. Transforms state based on block.
state | state to transform |
block | block to transform |
Definition at line 147 of file md5.cc.
References Decode(), and MD5_memset().
Referenced by Input().
void MD5::Result | ( | unsigned char | digest[16] | ) |
|
private |
input buffer
Definition at line 140 of file system/include/pedigree/kernel/utilities/md5/md5.h.
Referenced by Input().
|
private |
number of bits, modulo 2^64 (lsb first)
Definition at line 137 of file system/include/pedigree/kernel/utilities/md5/md5.h.
|
private |
state (ABCD)
Definition at line 134 of file system/include/pedigree/kernel/utilities/md5/md5.h.