Class MD5.

Inherits Garbage

Implements the MD5 message-digest algorithm (RFC 1321).

Based on public-domain code written by Colin Plumb in 1993.

static EString MD5::HMAC( const EString & secret, const EString & text )

Returns the HMAC-MD5 digest of secret and text as a 32-char hex string with lowercase letters. (RFC 2104)

MD5::MD5()

Creates and initialises an empty MD5 object.

Reimplements Garbage::Garbage().

void MD5::add( const EString & s )

As above, but adds data from the EString s.

void MD5::add( const char * str, uint len )

Updates the MD5 context to reflect the concatenation of len bytes from str.

static EString MD5::hash( const Buffer & s )

Returns the MD5 hash of the Buffer s.

static EString MD5::hash( const EString & s )

Returns the MD5 hash of the EString s.

EString MD5::hash()

Returns the 16-byte MD5 hash of the bytes add()ed so far.

void MD5::init()

Initialises an MD5 context for use.

void MD5::transform()

The basic MD5 transformation: updates the MD5 hash context based on the next 64 bit block of input. (Padding, if necessary, is handled by the caller.)

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.