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
Wim Lewis
nettle
Commits
9959f304
Commit
9959f304
authored
Apr 22, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New aliases sha512_224_ctx and sha512_256_cxt, for the sha512_ctx struct tag.
parent
9b29534a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
ChangeLog
ChangeLog
+5
-0
sha2.h
sha2.h
+8
-4
sha512.c
sha512.c
+4
-4
No files found.
ChangeLog
View file @
9959f304
2014-04-22 Niels Möller <nisse@lysator.liu.se>
* sha2.h (sha512_224_ctx, sha512_256_ctx): New aliases for the
sha512_ctx struct tag.
2014-04-17 Niels Möller <nisse@lysator.liu.se>
* examples/Makefile.in (SOURCES): Deleted next-prime.c (forgotten
...
...
sha2.h
View file @
9959f304
...
...
@@ -167,25 +167,29 @@ sha384_digest(struct sha512_ctx *ctx,
#define SHA512_224_DIGEST_SIZE 28
#define SHA512_224_DATA_SIZE SHA512_DATA_SIZE
#define sha512_224_ctx sha512_ctx
void
sha512_224_init
(
struct
sha512_ctx
*
ctx
);
sha512_224_init
(
struct
sha512_
224_
ctx
*
ctx
);
#define sha512_224_update nettle_sha512_update
void
sha512_224_digest
(
struct
sha512_ctx
*
ctx
,
sha512_224_digest
(
struct
sha512_
224_
ctx
*
ctx
,
size_t
length
,
uint8_t
*
digest
);
#define SHA512_256_DIGEST_SIZE 32
#define SHA512_256_DATA_SIZE SHA512_DATA_SIZE
#define sha512_256_ctx sha512_ctx
void
sha512_256_init
(
struct
sha512_ctx
*
ctx
);
sha512_256_init
(
struct
sha512_
256_
ctx
*
ctx
);
#define sha512_256_update nettle_sha512_update
void
sha512_256_digest
(
struct
sha512_ctx
*
ctx
,
sha512_256_digest
(
struct
sha512_
256_
ctx
*
ctx
,
size_t
length
,
uint8_t
*
digest
);
...
...
sha512.c
View file @
9959f304
...
...
@@ -249,7 +249,7 @@ sha384_digest(struct sha512_ctx *ctx,
/* sha-512/224 variant. */
void
sha512_224_init
(
struct
sha512_ctx
*
ctx
)
sha512_224_init
(
struct
sha512_
224_
ctx
*
ctx
)
{
static
const
uint64_t
H0
[
_SHA512_DIGEST_LENGTH
]
=
{
...
...
@@ -269,7 +269,7 @@ sha512_224_init(struct sha512_ctx *ctx)
}
void
sha512_224_digest
(
struct
sha512_ctx
*
ctx
,
sha512_224_digest
(
struct
sha512_
224_
ctx
*
ctx
,
size_t
length
,
uint8_t
*
digest
)
{
...
...
@@ -282,7 +282,7 @@ sha512_224_digest(struct sha512_ctx *ctx,
/* sha-512/256 variant. */
void
sha512_256_init
(
struct
sha512_ctx
*
ctx
)
sha512_256_init
(
struct
sha512_
256_
ctx
*
ctx
)
{
static
const
uint64_t
H0
[
_SHA512_DIGEST_LENGTH
]
=
{
...
...
@@ -302,7 +302,7 @@ sha512_256_init(struct sha512_ctx *ctx)
}
void
sha512_256_digest
(
struct
sha512_ctx
*
ctx
,
sha512_256_digest
(
struct
sha512_
256_
ctx
*
ctx
,
size_t
length
,
uint8_t
*
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