RSTT
3.2.0
Regional Seismic Travel Time
|
This code implements the MD5 message-digest algorithm. The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish. More...
#include <MD50.h>
Public Member Functions | |
MD50 () | |
MD50 (const MD50 &md50) | |
virtual | ~MD50 () |
MD50 & | operator= (const MD50 &md50) |
const string & | getMD5HashHex (uchar const *data, int sze) |
Given an input data array and size sze, this function creates a 32 byte hexadecimal MD5 hash key from the data and returns the result as a string. No checking is performed on the size of the input array data. More... | |
void | getMD5HashHex (uchar const *data, int sze, string &hhstr) |
void | getMD5HashHex (const string &sin, string &hhstr) |
Given an input data array and size sze, this function creates a 32 byte hexadecimal MD5 hash key from the data and returns the result in hhstr. No checking is performed on the size of the input array data. More... | |
const string & | getMD5HashHex () const |
void | getMD5HashHex (string &s) const |
cuchar const * | getMD5HashBin (uchar const *data, int sze) |
Given an input data array and size sze, this function creates an MD5 hash key from the data and stores the 16 byte binary key in the attribute array hashkey. No checking is performed on the size of the array data. More... | |
cuchar const * | getMD5HashBin () |
Returns the 16 byte binary hash key. This function assumes that the MD5 conversion has already been performed. More... | |
void | setDefaultEndian () |
Sets the big endian flag to br. More... | |
void | setBigEndian () |
Sets the big endian flag to true. More... | |
void | setLittleEndian () |
Sets the big endian flag to false. More... | |
bool | getByteReverse () const |
Returns the big endian flag setting. More... | |
Static Public Member Functions | |
static int | hexStringSize () |
Returns the hexadecimal size of an MD5 hash key. More... | |
static int | hexSize () |
Returns the hexadecimal size of an MD5 hash key. More... | |
static int | binSize () |
Returns the binary size of an MD5 hash key. More... | |
static bool | isBigEndian () |
This code implements the MD5 message-digest algorithm. The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish.
The MD5 code was converted to an MD5 C++ object (MD50) by Jim Hipp, Sandia National Laboratories, in May of 2004. The code was modified Specifically for the PGL library and optimized to replace all "define" definitions with equivalent inlined function objects. The machine dependent byte reversal flag is called automatically at object construction to turn byte-reversal ON (big-endian) or OFF (little-endian). The flag can be manually set to either-endian format with the functions setBigEndian() or setLittleEndian().
The 32 byte hexadecimal string message digest is computed with any of the functions getMD5HashHex(...). The equivalent 16 byte binary message digest is returned with the functions getMD5BinHex(...).
util::MD50::MD50 | ( | ) |
util::MD50::MD50 | ( | const MD50 & | md50 | ) |
|
virtual |
|
inlinestatic |
|
inline |
|
inline |
const string& util::MD50::getMD5HashHex | ( | ) | const |
|
inline |
Given an input data array and size sze, this function creates a 32 byte hexadecimal MD5 hash key from the data and returns the result in hhstr. No checking is performed on the size of the input array data.
Given an input string sin, this function creates a 32 byte hexadecimal MD5 hash key from the strings data and returns the result in hhstr.
void util::MD50::getMD5HashHex | ( | string & | s | ) | const |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inline |
|
inline |
|
inline |