11 MD5Result
const& invalidResult()
13 static const MD5Result
val;
17 char unhexify(
char hexed)
21 case '0':
case '1':
case '2':
case '3':
case '4':
22 case '5':
case '6':
case '7':
case '8':
case '9':
24 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
25 return hexed -
'a' + 10;
26 case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
27 return hexed -
'A' + 10;
30 <<
"Non-hex character in Hash "
31 <<
"Please report this to the core framework developers";
70 "000102030405060708090a0b0c0d0e0f"
71 "101112131415161718191a1b1c1d1e1f"
72 "202122232425262728292a2b2c2d2e2f"
73 "303132333435363738393a3b3c3d3e3f"
74 "404142434445464748494a4b4c4d4e4f"
75 "505152535455565758595a5b5c5d5e5f"
76 "606162636465666768696a6b6c6d6e6f"
77 "707172737475767778797a7b7c7d7e7f"
78 "808182838485868788898a8b8c8d8e8f"
79 "909192939495969798999a9b9c9d9e9f"
80 "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
81 "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
82 "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
83 "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
84 "e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
85 "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
91 for(
unsigned int i=0;
i<
sizeof(
bytes);++
i){
107 const char*
p =
reinterpret_cast<const char*
>(&
bytes[0]);
122 std::string::const_iterator it = hexy.begin();
123 for (
size_t i = 0;
i != 16; ++
i)
126 bytes[
i] = ( unhexify(*it++) << 4 );
128 bytes[
i] += ( unhexify(*it++) );
136 <<
"String of illegal length: "
138 <<
" given to MD5Result::fromHexifiedString";
145 return (*
this != invalidResult());
156 return std::lexicographical_compare(a.
bytes,
184 const md5_byte_t*
data =
reinterpret_cast<const md5_byte_t*
>(s.data());
185 md5_append(&
state_, const_cast<md5_byte_t*>(data), s.size());
190 const md5_byte_t*
data =
reinterpret_cast<const md5_byte_t*
>(
s);
191 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)
std::string compactForm() const
void set_to_default(MD5Result &val)
bool operator==(MD5Result const &a, MD5Result const &b)
static const char * s_hexValues
std::string toString() const
char data[epos_bytes_allocation]
tuple size
Write out results.
void append(std::string const &s)