Commit 6846fe56 authored by Niels Möller's avatar Niels Möller
Browse files

New constants for SHA512-224 and SHA512-256.

parent 27ee8ac2
2014-04-09 Niels Möller <>
* 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.
* testsuite/testutils.c (test_hash): Removed redundant init call.
......@@ -156,6 +156,9 @@ sha384_digest(struct sha512_ctx *ctx,
/* SHA512_224 and SHA512_256, two truncated versions of SHA512
with different initial states. */
#define SHA512_224_DIGEST_SIZE 28
#define SHA512_224_DATA_SIZE SHA512_DATA_SIZE
sha512_224_init(struct sha512_ctx *ctx);
......@@ -166,6 +169,8 @@ sha512_224_digest(struct sha512_ctx *ctx,
size_t length,
uint8_t *digest);
#define SHA512_256_DIGEST_SIZE 32
#define SHA512_256_DATA_SIZE SHA512_DATA_SIZE
sha512_256_init(struct sha512_ctx *ctx);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment