Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wim Lewis
nettle
Commits
922a8b67
Commit
922a8b67
authored
Oct 03, 2012
by
Nikos Mavrogiannopoulos
Committed by
Niels Möller
Oct 03, 2012
Browse files
(test_hash): On failure, print the expected and returned hash values.
parent
c9f986d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
922a8b67
2012-10-03 Niels Möller <nisse@lysator.liu.se>
From: Nikos Mavrogiannopoulos:
* testsuite/testutils.c (test_hash): On failure, print the
expected and returned hash values.
2012-09-23 Niels Möller <nisse@lysator.liu.se>
* Makefile.in (nettle_SOURCES): Added salsa20-core-internal.c.
...
...
testsuite/testutils.c
View file @
922a8b67
...
...
@@ -498,7 +498,14 @@ test_hash(const struct nettle_hash *hash,
hash
->
update
(
ctx
,
msg
->
length
,
msg
->
data
);
hash
->
digest
(
ctx
,
hash
->
digest_size
,
buffer
);
ASSERT
(
MEMEQ
(
hash
->
digest_size
,
digest
->
data
,
buffer
));
if
(
MEMEQ
(
hash
->
digest_size
,
digest
->
data
,
buffer
)
==
0
)
{
fprintf
(
stdout
,
"
\n
Got:
\n
"
);
print_hex
(
hash
->
digest_size
,
buffer
);
fprintf
(
stdout
,
"
\n
Expected:
\n
"
);
print_hex
(
hash
->
digest_size
,
digest
->
data
);
abort
();
}
memset
(
buffer
,
0
,
hash
->
digest_size
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment