#include <md5.h>
Calculates MD5 hashes of strings or byte arrays
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
◆ size_type
◆ MD5() [1/2]
◆ MD5() [2/2]
sptk::MD5::MD5 |
( |
const Buffer & |
data | ) |
|
|
explicit |
Shortcut constructor
Immediately processes text. The result can be read with hexdigest().
- Parameters
-
◆ finalize()
MD5 & sptk::MD5::finalize |
( |
| ) |
|
◆ hexdigest()
String sptk::MD5::hexdigest |
( |
| ) |
const |
Returns hexadecimal presentation of MD5 sum
◆ update() [1/2]
void sptk::MD5::update |
( |
const char * |
buffer, |
|
|
size_type |
length |
|
) |
| |
Adds data portion to MD5
- Parameters
-
buffer | Input data |
length | Size of input data |
◆ update() [2/2]
void sptk::MD5::update |
( |
const unsigned char * |
buffer, |
|
|
size_type |
length |
|
) |
| |
Adds data portion to MD5
- Parameters
-
buffer | Input data |
length | Size of input data |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
, |
|
|
MD5 |
md5 |
|
) |
| |
|
friend |
The documentation for this class was generated from the following file: