cfb8: Fix decrypt path
[gd/nettle] / sha1.h
diff --git a/sha1.h b/sha1.h
index 94711bfabe3c41758c95c4fc4c36b4e1f017aaa1..0f4964f8f61c112ba8480df6bb7b1fe514763a61 100644 (file)
--- a/sha1.h
+++ b/sha1.h
@@ -48,7 +48,9 @@ extern "C" {
 /* SHA1 */
 
 #define SHA1_DIGEST_SIZE 20
-#define SHA1_DATA_SIZE 64
+#define SHA1_BLOCK_SIZE 64
+/* For backwards compatibility */
+#define SHA1_DATA_SIZE SHA1_BLOCK_SIZE
 
 /* Digest is kept internally as 5 32-bit words. */
 #define _SHA1_DIGEST_LENGTH 5
@@ -57,8 +59,8 @@ struct sha1_ctx
 {
   uint32_t state[_SHA1_DIGEST_LENGTH];    /* State variables */
   uint64_t count;                         /* 64-bit block count */
-  uint8_t block[SHA1_DATA_SIZE];          /* SHA1 data buffer */
   unsigned int index;                     /* index into buffer */
+  uint8_t block[SHA1_BLOCK_SIZE];         /* SHA1 data buffer */
 };
 
 void
@@ -77,7 +79,9 @@ sha1_digest(struct sha1_ctx *ctx,
 /* Internal 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);
+nettle_sha1_compress(uint32_t *state, const uint8_t *data);
+
+#define _nettle_sha1_compress nettle_sha1_compress
 
 #ifdef __cplusplus
 }