Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
6846fe56
Commit
6846fe56
authored
11 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
New constants for SHA512-224 and SHA512-256.
parent
27ee8ac2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
sha2.h
+5
-0
5 additions, 0 deletions
sha2.h
with
8 additions
and
0 deletions
ChangeLog
+
3
−
0
View file @
6846fe56
2014-04-09 Niels Möller <nisse@lysator.liu.se>
2014-04-09 Niels Möller <nisse@lysator.liu.se>
* sha2.h (SHA512_224_DIGEST_SIZE, SHA512_224_DATA_SIZE)
(SHA512_256_DIGEST_SIZE, SHA512_256_DATA_SIZE): New constants.
* sha512.c (sha512_256_digest): Typo fix, call sha512_256_init.
* sha512.c (sha512_256_digest): Typo fix, call sha512_256_init.
* testsuite/testutils.c (test_hash): Removed redundant init call.
* testsuite/testutils.c (test_hash): Removed redundant init call.
...
...
This diff is collapsed.
Click to expand it.
sha2.h
+
5
−
0
View file @
6846fe56
...
@@ -156,6 +156,9 @@ sha384_digest(struct sha512_ctx *ctx,
...
@@ -156,6 +156,9 @@ sha384_digest(struct sha512_ctx *ctx,
/* SHA512_224 and SHA512_256, two truncated versions of SHA512
/* SHA512_224 and SHA512_256, two truncated versions of SHA512
with different initial states. */
with different initial states. */
#define SHA512_224_DIGEST_SIZE 28
#define SHA512_224_DATA_SIZE SHA512_DATA_SIZE
void
void
sha512_224_init
(
struct
sha512_ctx
*
ctx
);
sha512_224_init
(
struct
sha512_ctx
*
ctx
);
...
@@ -166,6 +169,8 @@ sha512_224_digest(struct sha512_ctx *ctx,
...
@@ -166,6 +169,8 @@ sha512_224_digest(struct sha512_ctx *ctx,
size_t
length
,
size_t
length
,
uint8_t
*
digest
);
uint8_t
*
digest
);
#define SHA512_256_DIGEST_SIZE 32
#define SHA512_256_DATA_SIZE SHA512_DATA_SIZE
void
void
sha512_256_init
(
struct
sha512_ctx
*
ctx
);
sha512_256_init
(
struct
sha512_ctx
*
ctx
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment