Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Brian Smith
nettle
Commits
922a8b67
Commit
922a8b67
authored
Oct 03, 2012
by
Nikos Mavrogiannopoulos
Committed by
Niels Möller
Oct 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(test_hash): On failure, print the expected and returned hash values.
parent
c9f986d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
ChangeLog
ChangeLog
+6
-0
testsuite/testutils.c
testsuite/testutils.c
+8
-1
No files found.
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
Markdown
is supported
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