From: Niels Möller Date: Thu, 9 Jun 2022 16:37:41 +0000 (+0200) Subject: New public names md5_compress and sha1_compress. X-Git-Tag: nettle_3.9_release_20230514~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fexport-sha256_compress;p=thirdparty%2Fnettle.git New public names md5_compress and sha1_compress. * md5.h (md5_compress): New public name for compression function. * sha1.h (sha1_compress): Likewise. --- diff --git a/ChangeLog b/ChangeLog index abe6853e..7b22b106 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2022-06-09 Niels Möller + * md5.h (md5_compress): New public name for compression function. + * sha1.h (sha1_compress): Likewise. + Based on patches from Corentin Labbe: * sha2.h: Declare new functions. * sha256.c (sha256_compress): New function. diff --git a/md5.h b/md5.h index e5ae228e..94098ab2 100644 --- a/md5.h +++ b/md5.h @@ -44,6 +44,7 @@ extern "C" { #define md5_init nettle_md5_init #define md5_update nettle_md5_update #define md5_digest nettle_md5_digest +#define md5_compress nettle_md5_compress #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 @@ -74,11 +75,12 @@ md5_digest(struct md5_ctx *ctx, size_t length, uint8_t *digest); -/* Internal compression function. STATE points to 4 uint32_t words, +/* MD5 compression function. STATE points to 4 uint32_t words, and DATA points to 64 bytes of input data, possibly unaligned. */ void -nettle_md5_compress(uint32_t *state, const uint8_t *data); +md5_compress(uint32_t *state, const uint8_t *data); +/* Old name, for backwards compatibility. */ #define _nettle_md5_compress nettle_md5_compress #ifdef __cplusplus diff --git a/sha1.h b/sha1.h index 0f4964f8..32b79dc7 100644 --- a/sha1.h +++ b/sha1.h @@ -44,6 +44,7 @@ extern "C" { #define sha1_init nettle_sha1_init #define sha1_update nettle_sha1_update #define sha1_digest nettle_sha1_digest +#define sha1_compress nettle_sha1_compress /* SHA1 */ @@ -76,11 +77,12 @@ sha1_digest(struct sha1_ctx *ctx, size_t length, uint8_t *digest); -/* Internal compression function. STATE points to 5 uint32_t words, +/* SHA1 compression function. STATE points to 5 uint32_t words, and DATA points to 64 bytes of input data, possibly unaligned. */ void -nettle_sha1_compress(uint32_t *state, const uint8_t *data); +sha1_compress(uint32_t *state, const uint8_t *data); +/* Old name, for backwards compatibility. */ #define _nettle_sha1_compress nettle_sha1_compress #ifdef __cplusplus