#include <md5.hpp>
Inheritance diagram for MD5:
Public Member Functions | |
MD5 () | |
Default constructor. | |
void | reset () |
Resets the MD5 checksum to initial state of computation. | |
void * | getValue (void *buffer) const |
Returns the MD5 checksum value in the first 16 bytes of the given adress. | |
wxString | getValue (const bool hexInUpperCase=false) const |
Returns the MD5 checksum value in a string. | |
void | update (const wxByte *buf, unsigned int len) |
Updates the MD5 checksum with specified array of bytes. | |
Protected Member Functions | |
void | finish () |
Process the remaining bytes in the internal buffer and the usual prolog according to the standard. | |
void | process_block (const void *buf, size_t len) |
Process len bytes of buf, accumulating context in this. | |
Protected Attributes | |
wxUint32 | A_ |
First part of the state of computation. | |
wxUint32 | B_ |
Second part of the state of computation. | |
wxUint32 | C_ |
Third part of the state of computation. | |
wxUint32 | D_ |
Fourth part of the state of computation. | |
wxUint32 | total [2] |
Number of bits mod 2^64. | |
wxUint32 | buflen |
Current size of the input buffer. | |
wxByte | ibuffer [128] |
Input buffer. | |
Static Protected Attributes | |
static const wxByte | fillbuf [64] |
The bytes used to pad the buffer to the next 64-byte boundary (RFC 1321, 3.1: Step 1). |
This class is a rewrite in C++ of the md5 checksum computing algorithm present in the GNU coreutils. Please see the GNU projet website for more informations.
Using this class in very simple:
Use the update method to provide to the class the bytes for computing the checksum.
The MD5 checksum value can be gotten by two ways:
|
Returns the MD5 checksum value in a string.
Implements Checksum. |
|
Returns the MD5 checksum value in the first 16 bytes of the given adress.
|
|
Process len bytes of buf, accumulating context in this.
It is assumed that
|
|
Updates the MD5 checksum with specified array of bytes.
Implements Checksum. |
|
Initial value: { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|