Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lsh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LSH
lsh
Commits
37e0e9ec
Commit
37e0e9ec
authored
Oct 31, 2008
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(test_main): Updated for seed file changes.
Rev: nettle/testsuite/yarrow-test.c:1.2
parent
87844526
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
nettle/testsuite/yarrow-test.c
nettle/testsuite/yarrow-test.c
+9
-7
No files found.
nettle/testsuite/yarrow-test.c
View file @
37e0e9ec
...
...
@@ -69,17 +69,19 @@ test_main(void)
struct
sha256_ctx
input_hash
;
uint8_t
digest
[
SHA256_DIGEST_SIZE
];
uint8_t
seed_file
[
YARROW256_SEED_FILE_SIZE
];
const
uint8_t
*
expected_output
=
decode_hex_dup
(
"
85fe6afb5bd627f3 ea20a6127038d3da
"
"
69e880a6ecbbb7d8 3514d967a2c4c0d4
"
);
=
decode_hex_dup
(
"
dd304aacac3dc95e 70d684a642967c89
"
"
58501f7c8eb88b79 43b2ffccde6f0f79
"
);
const
uint8_t
*
expected_input
=
decode_hex_dup
(
"e0596cf006025506 65d1195f32a87e4a"
"5c354910dfbd0a31 e2105b262f5ce3d8"
);
const
uint8_t
*
expected_seed_file
=
decode_hex_dup
(
"
3b7ad33dcd577048 b9e0cbc70b5ca12d
"
"
5882be29c964a3a6 ea79fdbfa06299dc
"
);
=
decode_hex_dup
(
"
b03518f32b1084dd 983e6a445d47bb6f
"
"
13bb7b998740d570 503d6aaa62e28901
"
);
unsigned
c
;
unsigned
t
;
...
...
@@ -91,7 +93,6 @@ test_main(void)
static
const
char
zeroes
[
100
];
yarrow256_init
(
&
yarrow
,
2
,
sources
);
memset
(
&
yarrow
.
seed_file
,
0
,
sizeof
(
yarrow
.
seed_file
));
yarrow_key_event_init
(
&
estimator
);
sha256_init
(
&
input_hash
);
...
...
@@ -182,14 +183,15 @@ test_main(void)
return
EXIT_FAILURE
;
}
yarrow256_random
(
&
yarrow
,
sizeof
(
seed_file
),
seed_file
);
if
(
verbose
)
{
printf
(
"New seed file: "
);
print_hex
(
sizeof
(
yarrow
.
seed_file
),
yarrow
.
seed_file
);
print_hex
(
sizeof
(
seed_file
),
seed_file
);
printf
(
"
\n
"
);
}
if
(
memcmp
(
yarrow
.
seed_file
,
expected_seed_file
,
sizeof
(
yarrow
.
seed_file
)))
if
(
memcmp
(
seed_file
,
expected_seed_file
,
sizeof
(
seed_file
)))
{
fprintf
(
stderr
,
"Failed.
\n
"
);
return
EXIT_FAILURE
;
...
...
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