summaryrefslogtreecommitdiff
path: root/sha1.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-04-25 22:12:36 +0200
committerNiels Möller <nisse@lysator.liu.se>2014-04-25 22:12:36 +0200
commitd22bac823e653bb6b04079e7ad1e8bc06a2342ca (patch)
tree451ebe588182ea671653fcfdbb434808f969c5d3 /sha1.h
parent1e79b7221f9883530a5c6459e2018b887e39d314 (diff)
downloadnettle-d22bac823e653bb6b04079e7ad1e8bc06a2342ca.tar.gz
Rename *_DATA_SIZE to *_BLOCK_SIZE.
Diffstat (limited to 'sha1.h')
-rw-r--r--sha1.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sha1.h b/sha1.h
index 94711bfa..7500d0c2 100644
--- 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,7 +59,7 @@ 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 */
+ uint8_t block[SHA1_BLOCK_SIZE]; /* SHA1 data buffer */
unsigned int index; /* index into buffer */
};