summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2022-06-09 18:37:41 +0200
committerNiels Möller <nisse@lysator.liu.se>2022-06-09 18:41:27 +0200
commitfde7c534529c1762df1295d0452fe3cc81fdf3fe (patch)
treec21e66c7035a427037be90af2740fdec8b2ccdb0
parentdab2e4dc8a1fbd01711446df6239b1b02118cb06 (diff)
downloadnettle-export-sha256_compress.tar.gz
New public names md5_compress and sha1_compress.export-sha256_compress
* md5.h (md5_compress): New public name for compression function. * sha1.h (sha1_compress): Likewise.
-rw-r--r--ChangeLog3
-rw-r--r--md5.h6
-rw-r--r--sha1.h6
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index abe6853e..7b22b106 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2022-06-09 Niels Möller <nisse@lysator.liu.se>
+ * 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