Class MD5.

Inherits Garbage

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

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

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

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


Creates and initialises an empty MD5 object.

Reimplements Garbage::Garbage().

void MD5::add( const String & s )

As above, but adds data from the String s.

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

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

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

Returns the MD5 hash of the Buffer s.

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

Returns the MD5 hash of the String s.

String 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 Oryx Mail Systems GmbH. All rights reserved.