lhashes  1.0.0
C++ hashes library
limes::hash::MD5 Class Referencefinal

A Hasher object that calculates an MD5 hash. More...

#include <lhashes_md5.h>

+ Inheritance diagram for limes::hash::MD5:

Public Member Functions

std::string getHash () final
 Retrieves the calculated MD5 hash value as a string. More...
 
std::size_t getLengthOfHash () const final
 Returns 32. More...
 
void update (const unsigned char *input, std::size_t length) final
 Updates the internal state of the hasher with new data. More...
 
- Public Member Functions inherited from limes::hash::Hasher
virtual ~Hasher ()=default
 Destructor. More...
 
virtual void update (std::string_view input)
 Updates the internal state of the hasher with some new data. More...
 

Related Functions

(Note that these are not member functions.)

LHASH_EXPORT std::string md5 (const char *input, std::size_t length)
 Calculates an MD5 hash for the given data. More...
 
LHASH_EXPORT std::string md5 (std::string_view input)
 Calculates an MD5 hash for the given string. More...
 

Detailed Description

A Hasher object that calculates an MD5 hash.

Note
MD5 is considered to be broken and insecure, so shouldn't be used for security-critical purposes in new applications, but is provided here for backwards compatibility.

Definition at line 39 of file lhashes_md5.h.

Member Function Documentation

◆ getHash()

std::string limes::hash::MD5::getHash ( )
finalvirtual

Retrieves the calculated MD5 hash value as a string.

Implements limes::hash::Hasher.

◆ getLengthOfHash()

std::size_t limes::hash::MD5::getLengthOfHash ( ) const
finalvirtual

Returns 32.

Implements limes::hash::Hasher.

◆ update()

void limes::hash::MD5::update ( const unsigned char *  input,
std::size_t  length 
)
finalvirtual

Updates the internal state of the hasher with new data.

Implements limes::hash::Hasher.


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