Slightly modified MD5 lib. Allows access to raw binary instead of hexadecimal ascii.
MD5 Class Reference
a small class for calculating MD5 hashes of strings or byte arrays it is not meant to be fast or secure More...
#include <md5.h>
Public Member Functions | |
MD5 (const std::string &text) | |
take string, hash it and finalize | |
void | update (const unsigned char *buf, size_type length) |
add text to hash | |
void | update (const char *buf, size_type length) |
add text to hash | |
MD5 & | finalize () |
calculate the final hash value | |
std::string | hexdigest () const |
const unsigned char * | rawdigest () const |
Detailed Description
a small class for calculating MD5 hashes of strings or byte arrays it is not meant to be fast or secure
usage: 1) feed it blocks of uchars with update() 2) finalize() 3) get hexdigest() string or MD5(std::string).hexdigest()
assumes that char is 8 bit and int is 32 bit
Definition at line 50 of file md5.h.
Constructor & Destructor Documentation
MD5 | ( | const std::string & | text ) |
Member Function Documentation
std::string hexdigest | ( | ) | const |
const unsigned char* rawdigest | ( | ) | const |
void update | ( | const char * | buf, |
size_type | length | ||
) |
add text to hash
- Parameters:
-
buf the text to add to the hash text length
void update | ( | const unsigned char * | buf, |
size_type | length | ||
) |
add text to hash
- Parameters:
-
buf the text to add to the hash text length
Generated on Thu Sep 8 2022 01:08:55 by 1.7.2