Thrill
0.1
|
#include <md5.hpp>
Public Member Functions | |
MD5 () | |
construct empty object. More... | |
MD5 (const void *data, uint32_t size) | |
construct context and process data range More... | |
MD5 (const std::string &str) | |
construct context and process string More... | |
std::string | digest () |
finalize computation and return 16 byte (128 bit) digest More... | |
std::string | digest_hex () |
finalize computation and return 16 byte (128 bit) digest hex encoded More... | |
std::string | digest_hex_uc () |
finalize computation and return 16 byte (128 bit) digest upper-case hex More... | |
void | finalize (void *digest) |
finalize computation and output 16 byte (128 bit) digest More... | |
void | process (const void *data, uint32_t size) |
process more data More... | |
void | process (const std::string &str) |
process more data More... | |
Static Public Attributes | |
static constexpr size_t | kDigestLength = 16 |
digest length in bytes More... | |
Private Attributes | |
uint8_t | buf_ [64] |
uint32_t | curlen_ |
uint64_t | length_ |
uint32_t | state_ [4] |
MD5 | ( | ) |
construct empty object.
Definition at line 166 of file md5.cpp.
Referenced by tlx::md5_hex(), and tlx::md5_hex_uc().
MD5 | ( | const void * | data, |
uint32_t | size | ||
) |
construct context and process data range
Definition at line 175 of file md5.cpp.
References MD5::process().
|
explicit |
construct context and process string
Definition at line 179 of file md5.cpp.
References MD5::process().
std::string digest | ( | ) |
finalize computation and return 16 byte (128 bit) digest
Definition at line 253 of file md5.cpp.
References MD5::finalize(), and MD5::kDigestLength.
Referenced by MD5::digest_hex(), and MD5::digest_hex_uc().
std::string digest_hex | ( | ) |
finalize computation and return 16 byte (128 bit) digest hex encoded
Definition at line 259 of file md5.cpp.
References MD5::digest(), MD5::finalize(), tlx::hexdump_lc(), and MD5::kDigestLength.
std::string digest_hex_uc | ( | ) |
finalize computation and return 16 byte (128 bit) digest upper-case hex
Definition at line 265 of file md5.cpp.
References MD5::digest(), MD5::finalize(), tlx::hexdump(), and MD5::kDigestLength.
void finalize | ( | void * | digest | ) |
finalize computation and output 16 byte (128 bit) digest
Definition at line 221 of file md5.cpp.
References MD5::buf_, MD5::curlen_, MD5::length_, tlx::digest_detail::md5_compress(), MD5::state_, tlx::digest_detail::store32l(), and tlx::digest_detail::store64l().
Referenced by MD5::digest(), MD5::digest_hex(), and MD5::digest_hex_uc().
void process | ( | const void * | data, |
uint32_t | size | ||
) |
process more data
Definition at line 183 of file md5.cpp.
References MD5::buf_, MD5::curlen_, MD5::length_, tlx::digest_detail::md5_compress(), tlx::digest_detail::min(), and MD5::state_.
Referenced by MD5::MD5(), and MD5::process().
void process | ( | const std::string & | str | ) |
|
private |
Definition at line 60 of file md5.hpp.
Referenced by MD5::finalize(), and MD5::process().
|
private |
Definition at line 59 of file md5.hpp.
Referenced by MD5::finalize(), and MD5::process().
|
static |
digest length in bytes
Definition at line 44 of file md5.hpp.
Referenced by MD5::digest(), MD5::digest_hex(), and MD5::digest_hex_uc().
|
private |
Definition at line 57 of file md5.hpp.
Referenced by MD5::finalize(), and MD5::process().
|
private |
Definition at line 58 of file md5.hpp.
Referenced by MD5::finalize(), and MD5::process().