md5-lib A high-performance C++17 library for calculating MD5 hashes
|
Functions | |
std::string | CalculateMD5 (std::istream &stream) |
Calculates the MD5 hash of a data stream. | |
std::string | CalculateMD5 (const unsigned char *data, std::size_t size) |
Calculates the MD5 hash of a contiguous block of memory. | |
std::string md5_lib::CalculateMD5 | ( | const unsigned char * | data, |
std::size_t | size | ||
) |
Calculates the MD5 hash of a contiguous block of memory.
A convenience overload for hashing data that is already in memory, such as a std::string or std::vector's data.
data | A non-null pointer to the beginning of the data block. The type is const unsigned char* as it is the conventional type in C++ for representing raw, untyped byte data. |
size | The size of the data block in bytes. |
std::string md5_lib::CalculateMD5 | ( | std::istream & | stream | ) |
Calculates the MD5 hash of a data stream.
Reads the input stream in chunks. The stream's state will be modified by the read operations.
stream | The input stream to hash. The stream will be read until EOF. |
std::ios_base::failure | on stream reading errors if the stream's exception mask is set to throw on badbit . |