hash: call finish before comparing in tests
This commit is contained in:
parent
246b68c540
commit
61634286d3
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user