diff options
Diffstat (limited to 'src/microhttpd/sha256.h')
-rw-r--r-- | src/microhttpd/sha256.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/microhttpd/sha256.h b/src/microhttpd/sha256.h index 8feb52fe..192f906a 100644 --- a/src/microhttpd/sha256.h +++ b/src/microhttpd/sha256.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libmicrohttpd | 2 | This file is part of libmicrohttpd |
3 | Copyright (C) 2019-2021 Karlson2k (Evgeny Grin) | 3 | Copyright (C) 2019-2022 Evgeny Grin (Karlson2k) |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
@@ -69,12 +69,17 @@ | |||
69 | */ | 69 | */ |
70 | #define SHA256_BLOCK_SIZE (SHA256_BLOCK_SIZE_BITS / 8) | 70 | #define SHA256_BLOCK_SIZE (SHA256_BLOCK_SIZE_BITS / 8) |
71 | 71 | ||
72 | /** | ||
73 | * Size of single processing block in bytes | ||
74 | */ | ||
75 | #define SHA256_BLOCK_SIZE_WORDS (SHA256_BLOCK_SIZE_BITS / SHA256_WORD_SIZE_BITS) | ||
76 | |||
72 | 77 | ||
73 | struct Sha256Ctx | 78 | struct Sha256Ctx |
74 | { | 79 | { |
75 | uint32_t H[_SHA256_DIGEST_LENGTH]; /**< Intermediate hash value / digest at end of calculation */ | 80 | uint32_t H[_SHA256_DIGEST_LENGTH]; /**< Intermediate hash value / digest at end of calculation */ |
76 | uint8_t buffer[SHA256_BLOCK_SIZE]; /**< SHA256 input data buffer */ | 81 | uint32_t buffer[SHA256_BLOCK_SIZE_WORDS]; /**< SHA256 input data buffer */ |
77 | uint64_t count; /**< number of bytes, mod 2^64 */ | 82 | uint64_t count; /**< number of bytes, mod 2^64 */ |
78 | }; | 83 | }; |
79 | 84 | ||
80 | /** | 85 | /** |