nettle export only md5_compress and sha1_compress. Let's export also the compress functions for sha256 and sha512.
Signed-off-by: Corentin Labbe <[email protected]> --- sha2.h | 5 ++++- sha256.c | 6 ++++++ sha3-384.c | 1 + sha3.h | 3 +++ sha512.c | 6 ++++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sha2.h b/sha2.h index ca8222a7..9eefca75 100644 --- a/sha2.h +++ b/sha2.h @@ -186,7 +186,10 @@ void sha512_256_digest(struct sha512_256_ctx *ctx, size_t length, uint8_t *digest); - + +void +nettle_sha256_compress(uint32_t *state, const uint8_t *input); + #ifdef __cplusplus } #endif diff --git a/sha256.c b/sha256.c index 253c1319..0ecb6538 100644 --- a/sha256.c +++ b/sha256.c @@ -161,3 +161,9 @@ sha224_digest(struct sha256_ctx *ctx, sha256_write_digest(ctx, length, digest); sha224_init(ctx); } + +void +nettle_sha256_compress(uint32_t *state, const uint8_t *input) +{ + _nettle_sha256_compress(state, input, K); +} diff --git a/sha3-384.c b/sha3-384.c index 62860248..43181c8f 100644 --- a/sha3-384.c +++ b/sha3-384.c @@ -68,3 +68,4 @@ sha3_384_digest(struct sha3_384_ctx *ctx, _nettle_write_le64 (length, digest, ctx->state.a); sha3_384_init (ctx); } + diff --git a/sha3.h b/sha3.h index 9220829d..913db6e0 100644 --- a/sha3.h +++ b/sha3.h @@ -183,6 +183,9 @@ sha3_512_digest(struct sha3_512_ctx *ctx, size_t length, uint8_t *digest); +void +nettle_sha512_compress(uint64_t *state, const uint8_t *input); + #ifdef __cplusplus } #endif diff --git a/sha512.c b/sha512.c index 6936cb50..8b0142c2 100644 --- a/sha512.c +++ b/sha512.c @@ -312,3 +312,9 @@ sha512_256_digest(struct sha512_256_ctx *ctx, sha512_write_digest(ctx, length, digest); sha512_256_init(ctx); } + +void +nettle_sha512_compress(uint64_t *state, const uint8_t *input) +{ + _nettle_sha512_compress(state, input, K); +} -- 2.35.1 _______________________________________________ nettle-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
