aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/sha1.h')
-rw-r--r--src/microhttpd/sha1.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/microhttpd/sha1.h b/src/microhttpd/sha1.h
index 800a4909..59f00217 100644
--- a/src/microhttpd/sha1.h
+++ b/src/microhttpd/sha1.h
@@ -28,7 +28,7 @@
28 28
29#include "mhd_options.h" 29#include "mhd_options.h"
30#include <stdint.h> 30#include <stdint.h>
31#include <stddef.h> 31#include <stddef.h> /* for size_t */
32 32
33/** 33/**
34 * SHA-1 digest is kept internally as 5 32-bit words. 34 * SHA-1 digest is kept internally as 5 32-bit words.
@@ -36,9 +36,19 @@
36#define _SHA1_DIGEST_LENGTH 5 36#define _SHA1_DIGEST_LENGTH 5
37 37
38/** 38/**
39 * Number of bytes in single SHA-1 word
40 */
41#define SHA1_WORD_SIZE_BITS 32
42
43/**
44 * Number of bytes in single SHA-1 word
45 */
46#define SHA1_BYTES_IN_WORD (SHA1_WORD_SIZE_BITS / 8)
47
48/**
39 * Size of SHA-1 digest in bytes 49 * Size of SHA-1 digest in bytes
40 */ 50 */
41#define SHA1_DIGEST_SIZE (_SHA1_DIGEST_LENGTH * 4) 51#define SHA1_DIGEST_SIZE (_SHA1_DIGEST_LENGTH * SHA1_BYTES_IN_WORD)
42 52
43/** 53/**
44 * Size of SHA-1 digest string in chars including termination NUL 54 * Size of SHA-1 digest string in chars including termination NUL