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
Brian Smith
nettle
Commits
9f3ff09f
Commit
9f3ff09f
authored
Apr 22, 2003
by
Niels Möller
Browse files
* sha-example.c (display_hex): Simplified by using printf better.
Rev: src/nettle/ChangeLog:1.191 Rev: src/nettle/sha-example.c:1.2
parent
8dfc66bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
9f3ff09f
2003-04-22 Niels Mller <nisse@cuckoo.hack.org>
* sha-example.c (display_hex): Simplified by using printf better.
* nettle.texinfo (Example): Use @verbatiminclude to include the
example program.
* sha-example.c: Example program, for inclusion in the manual.
Fixed bugs reported by Mark Arking.
2003-04-14 Niels Mller <niels@s3.kth.se>
...
...
sha-example.c
View file @
9f3ff09f
...
...
@@ -8,14 +8,11 @@
static
void
display_hex
(
unsigned
length
,
uint8_t
*
data
)
{
static
const
char
digits
[
16
]
=
"0123456789abcdef"
;
unsigned
i
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
uint8_t
byte
=
data
[
i
];
printf
(
"%c%c "
,
digits
[(
byte
/
16
)
&
0xf
],
digits
[
byte
&
0xf
]);
}
printf
(
"%2x "
,
data
[
i
]);
printf
(
"
\n
"
);
}
...
...
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