libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit c38e0a30f80158be8a806d91e644e143042fafde
parent 338dba5d1dc536bc92998ea7151d62332b8711ae
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  2 May 2022 14:38:03 +0300

digestauth: use 7 bit shift for fast "hash"

As only ASCII printable chars are used for "nonce", the highest bit
is always zero.

Diffstat:
Msrc/microhttpd/digestauth.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c @@ -522,7 +522,7 @@ fast_simple_hash (const uint8_t *data, size_t i; hash = data[0]; for (i = 1; i < data_size; i++) - hash = _MHD_ROTL32 (hash, 8) ^ data[i]; + hash = _MHD_ROTL32 (hash, 7) ^ data[i]; } else hash = 0;