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
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
8d1d5d6d
Commit
8d1d5d6d
authored
Jun 25, 2013
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nettle-hash.c: Use stack allocation for the small hex output buffer.
parent
8fc5dff5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
ChangeLog
ChangeLog
+3
-0
tools/nettle-hash.c
tools/nettle-hash.c
+1
-2
No files found.
ChangeLog
View file @
8d1d5d6d
2013-06-25 Niels Möller <nisse@lysator.liu.se>
* tools/nettle-hash.c (digest_file): Use stack allocation for the
small hex output buffer.
* examples/io.c (MIN): Deleted unused macro.
2013-05-21 Niels Möller <nisse@lysator.liu.se>
...
...
tools/nettle-hash.c
View file @
8d1d5d6d
...
...
@@ -108,7 +108,7 @@ digest_file(const struct nettle_hash *alg,
else
{
unsigned
i
;
char
*
hex
=
xalloc
(
BASE16_ENCODE_LENGTH
(
8
)
+
1
)
;
char
hex
[
BASE16_ENCODE_LENGTH
(
8
)
+
1
]
;
for
(
i
=
0
;
i
+
8
<
digest_length
;
i
+=
8
)
{
base16_encode_update
(
hex
,
8
,
digest
+
i
);
...
...
@@ -118,7 +118,6 @@ digest_file(const struct nettle_hash *alg,
base16_encode_update
(
hex
,
digest_length
-
i
,
digest
+
i
);
hex
[
BASE16_ENCODE_LENGTH
(
digest_length
-
i
)]
=
0
;
printf
(
"%s %s
\n
"
,
hex
,
alg
->
name
);
free
(
hex
);
}
free
(
digest
);
...
...
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