Rudiments
Public Member Functions | List of all members
md5 Class Reference

Inherits hash.

Public Member Functions

 md5 ()
 
virtual ~md5 ()
 
bool append (const unsigned char *data, uint32_t length)
 
const unsigned char * getHash ()
 
uint32_t getHashLength ()
 
bool clear ()
 
hasherror_t getError ()
 
- Public Member Functions inherited from hash
 hash ()
 
virtual ~hash ()
 

Detailed Description

The md5 class provides a simple md5 implementation.

Constructor & Destructor Documentation

◆ md5()

md5::md5 ( )

Creates an instance of the md5 class.

◆ ~md5()

virtual md5::~md5 ( )
virtual

Deletes this instance of the md5 class.

Member Function Documentation

◆ append()

bool md5::append ( const unsigned char *  data,
uint32_t  length 
)
virtual

Appends "length" bytes of "data" to the data to be hashed. Returns true on success or false if an error occurred.

Implements hash.

◆ clear()

bool md5::clear ( )
virtual

Clears the current hash and any data that had previously been appended. Returns true on success or false if an error occurred.

Implements hash.

◆ getError()

hasherror_t md5::getError ( )
virtual

Returns the most recent error.

Implements hash.

◆ getHash()

const unsigned char* md5::getHash ( )
virtual

Returns the current hash on success or NULL if an error occurred. Note that the current hash will be an empty string if no data has been appended yet.

Implements hash.

◆ getHashLength()

uint32_t md5::getHashLength ( )
virtual

Returns the length of the hash in bytes.

Implements hash.