9 MD5Result
const& invalidResult() {
10 static const MD5Result
val;
14 char unhexify(
char hexed) {
33 return hexed -
'a' + 10;
40 return hexed -
'A' + 10;
43 <<
"Please report this to the core framework developers";
78 "000102030405060708090a0b0c0d0e0f" 79 "101112131415161718191a1b1c1d1e1f" 80 "202122232425262728292a2b2c2d2e2f" 81 "303132333435363738393a3b3c3d3e3f" 82 "404142434445464748494a4b4c4d4e4f" 83 "505152535455565758595a5b5c5d5e5f" 84 "606162636465666768696a6b6c6d6e6f" 85 "707172737475767778797a7b7c7d7e7f" 86 "808182838485868788898a8b8c8d8e8f" 87 "909192939495969798999a9b9c9d9e9f" 88 "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf" 89 "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf" 90 "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf" 91 "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf" 92 "e0e1e2e3e4e5e6e7e8e9eaebecedeeef" 93 "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
96 std::array<char, 16 * 2>
buf;
97 char* pBuf =
buf.begin();
113 const char*
p =
reinterpret_cast<const char*
>(
bytes.data());
118 switch (hexy.size()) {
123 std::string::const_iterator it = hexy.begin();
124 for (
size_t i = 0;
i != 16; ++
i) {
126 bytes[
i] = (unhexify(*it++) << 4);
128 bytes[
i] += (unhexify(*it++));
134 <<
"String of illegal length: " << hexy.size() <<
" given to MD5Result::fromHexifiedString";
142 return std::equal(
a.bytes.begin(),
a.bytes.end(),
b.bytes.begin());
146 return std::lexicographical_compare(
a.bytes.begin(),
a.bytes.end(),
b.bytes.begin(),
b.bytes.end());
162 const md5_byte_t*
data =
reinterpret_cast<const md5_byte_t*
>(
s.data());
163 md5_append(&
state_, const_cast<md5_byte_t*>(
data),
s.size());
167 const md5_byte_t*
data =
reinterpret_cast<const md5_byte_t*
>(
s);
168 md5_append(&
state_, const_cast<md5_byte_t*>(
data), size);
void fromHexifiedString(std::string const &s)
bool equal(const T &first, const T &second)
bool operator<(MD5Result const &a, MD5Result const &b)
void set_to_default(MD5Result &val)
bool operator==(MD5Result const &a, MD5Result const &b)
Namespace of DDCMS conversion namespace.
std::array< unsigned char, 16 > bytes
std::string compactForm() const
static const char * s_hexValues
char data[epos_bytes_allocation]
std::string toString() const
void append(std::string const &s)