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

New public names md5_compress and sha1_compress.

* md5.h (md5_compress): New public name for compression function.
* sha1.h (sha1_compress): Likewise.
parent dab2e4dc
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.
......
......@@ -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
......
......@@ -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
......
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