aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/lgl/sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/lgl/sha1.c')
-rw-r--r--src/daemon/https/lgl/sha1.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/daemon/https/lgl/sha1.c b/src/daemon/https/lgl/sha1.c
index c336cc4e..573e7c69 100644
--- a/src/daemon/https/lgl/sha1.c
+++ b/src/daemon/https/lgl/sha1.c
@@ -199,7 +199,8 @@ MHD_sha1_buffer (const char *buffer, size_t len, void *resblock)
199} 199}
200 200
201void 201void
202MHD_sha1_process_bytes (const void *buffer, size_t len, struct MHD_sha1_ctx *ctx) 202MHD_sha1_process_bytes (const void *buffer, size_t len,
203 struct MHD_sha1_ctx *ctx)
203{ 204{
204 /* When we already have some bits in our internal buffer concatenate 205 /* When we already have some bits in our internal buffer concatenate
205 both inputs first. */ 206 both inputs first. */
@@ -235,7 +236,8 @@ MHD_sha1_process_bytes (const void *buffer, size_t len, struct MHD_sha1_ctx *ctx
235 if (UNALIGNED_P (buffer)) 236 if (UNALIGNED_P (buffer))
236 while (len > 64) 237 while (len > 64)
237 { 238 {
238 MHD_sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); 239 MHD_sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64,
240 ctx);
239 buffer = (const char *) buffer + 64; 241 buffer = (const char *) buffer + 64;
240 len -= 64; 242 len -= 64;
241 } 243 }
@@ -284,7 +286,8 @@ MHD_sha1_process_bytes (const void *buffer, size_t len, struct MHD_sha1_ctx *ctx
284 Most of this code comes from GnuPG's cipher/sha1.c. */ 286 Most of this code comes from GnuPG's cipher/sha1.c. */
285 287
286void 288void
287MHD_sha1_process_block (const void *buffer, size_t len, struct MHD_sha1_ctx *ctx) 289MHD_sha1_process_block (const void *buffer, size_t len,
290 struct MHD_sha1_ctx *ctx)
288{ 291{
289 const uint32_t *words = buffer; 292 const uint32_t *words = buffer;
290 size_t nwords = len / sizeof (uint32_t); 293 size_t nwords = len / sizeof (uint32_t);