RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
util::MD50 Class Reference

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.
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.
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.
cuchar const * | getMD5HashBin ()
| Returns the 16 byte binary hash key. This function assumes that the MD5 conversion has already been performed.
void | setDefaultEndian ()
| Sets the big endian flag to br.
void | setBigEndian ()
| Sets the big endian flag to true.
void | setLittleEndian ()
| Sets the big endian flag to false.
bool | getByteReverse () const
| Returns the big endian flag setting.

## Static Public Member Functions
static int | hexStringSize ()
| Returns the hexadecimal size of an MD5 hash key.
static int | hexSize ()
| Returns the hexadecimal size of an MD5 hash key.
static int | binSize ()
| Returns the binary size of an MD5 hash key.
static bool | isBigEndian ()

## Detailed Description

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(...).

Definition at line 81 of file MD50.h.

## Constructor & Destructor Documentation

## ◆ MD50() [1/2]

util::MD50::MD50 | ( |  | ) |

## ◆ MD50() [2/2]

util::MD50::MD50 | ( | const MD50 & | md50 | ) |

## ◆ ~MD50()

virtual util::MD50::~MD50 | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ binSize()

int util::MD50::binSize | ( |  | ) |
| inline static

Returns the binary size of an MD5 hash key.

Definition at line 218 of file MD50.h.

## ◆ getByteReverse()

bool util::MD50::getByteReverse | ( |  | ) | const
| inline

Returns the big endian flag setting.

Definition at line 261 of file MD50.h.

## ◆ getMD5HashBin() [1/2]

cuchar const * util::MD50::getMD5HashBin | ( |  | ) |
| inline

Returns the 16 byte binary hash key. This function assumes that the MD5 conversion has already been performed.

Definition at line 339 of file MD50.h.

## ◆ getMD5HashBin() [2/2]

cuchar const * util::MD50::getMD5HashBin | ( | uchar const * | data,
|  | int | sze )
| inline

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.

Definition at line 325 of file MD50.h.

## ◆ getMD5HashHex() [1/5]

const string & util::MD50::getMD5HashHex | ( |  | ) | const

## ◆ getMD5HashHex() [2/5]

void util::MD50::getMD5HashHex | ( | const string & | sin,
|  | string & | hhstr )
| 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.

Definition at line 307 of file MD50.h.

## ◆ getMD5HashHex() [3/5]

void util::MD50::getMD5HashHex | ( | string & | s | ) | const

## ◆ getMD5HashHex() [4/5]

const string & util::MD50::getMD5HashHex | ( | uchar const * | data,
|  | int | sze )
| 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 as a string. No checking is performed on the size of the input array data.

Definition at line 274 of file MD50.h.

## ◆ getMD5HashHex() [5/5]

void util::MD50::getMD5HashHex | ( | uchar const * | data,
|  | int | sze,
|  | string & | hhstr )
| inline

Definition at line 104 of file MD50.h.

## ◆ hexSize()

int util::MD50::hexSize | ( |  | ) |
| inline static

Returns the hexadecimal size of an MD5 hash key.

Definition at line 208 of file MD50.h.

## ◆ hexStringSize()

int util::MD50::hexStringSize | ( |  | ) |
| inline static

Returns the hexadecimal size of an MD5 hash key.

Definition at line 198 of file MD50.h.

## ◆ isBigEndian()

bool util::MD50::isBigEndian | ( |  | ) |
| static

## ◆ operator=()

MD50 & util::MD50::operator= | ( | const MD50 & | md50 | ) |

## ◆ setBigEndian()

void util::MD50::setBigEndian | ( |  | ) |
| inline

Sets the big endian flag to true.

Definition at line 241 of file MD50.h.

## ◆ setDefaultEndian()

void util::MD50::setDefaultEndian | ( |  | ) |
| inline

Sets the big endian flag to br.

Definition at line 228 of file MD50.h.

## ◆ setLittleEndian()

void util::MD50::setLittleEndian | ( |  | ) |
| inline

Sets the big endian flag to false.

Definition at line 251 of file MD50.h.

The documentation for this class was generated from the following file:

- rstt_v3.2.1/SLBM/include/MD50.h