| 264 | }; |
| 265 | |
| 266 | void Main() { |
| 267 | Int success = 0; |
| 268 | Int count = 0; |
| 269 | for (const char **p = testpairs; *p; p += 2) { |
| 270 | count++; |
| 271 | if (MD5::hexdigest(S(p[0]))->eq(p[1])) |
| 272 | success++; |
| 273 | } |
| 274 | Str *report = |
| 275 | S("MD5 (")->add(S(success))->add("/")->add(S(count))->add(" matches)"); |
| 276 | Check(success == count, report->c_str()); |
| 277 | } |