hash: call finish before comparing in tests

This commit is contained in:
Danny Robson 2014-05-20 13:33:08 +10:00
parent 246b68c540
commit 61634286d3
3 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,7 @@ main (int, char **) {
for (const auto &i: TESTS) {
MD2 h;
h.update (i.input, strlen (i.input));
h.finish ();
auto out = h.digest ();
if (out != i.output) {

View File

@ -55,6 +55,7 @@ main (int, char**) {
for (auto i: TESTS) {
MD4 h;
h.update (i.input, strlen (i.input));
h.finish ();
auto out = h.digest ();
if (out != i.output) {

View File

@ -46,6 +46,7 @@ main (int, char**) {
for (auto i: TESTS) {
MD5 h;
h.update (i.input, strlen (i.input));
h.finish ();
auto out = h.digest ();
if (out != i.output) {