[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/06: sha256: renamed one function for clarity and unif
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/06: sha256: renamed one function for clarity and uniformity |
Date: |
Sun, 16 May 2021 19:04:33 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 356187139c78ee5be253fe1c3cba932b210ec84e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun May 16 18:02:22 2021 +0300
sha256: renamed one function for clarity and uniformity
---
src/microhttpd/digestauth.c | 2 +-
src/microhttpd/sha256.c | 4 ++--
src/microhttpd/sha256.h | 4 ++--
src/microhttpd/test_sha256.c | 8 ++++----
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 649fef62..04c9f22a 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -1212,7 +1212,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
da.sessionkey = skey.sha256; \
da.init = &MHD_SHA256_init; \
da.update = &MHD_SHA256_update; \
- da.digest = &sha256_finish; \
+ da.digest = &MHD_SHA256_finish; \
break; \
default: \
mhd_assert (false); \
diff --git a/src/microhttpd/sha256.c b/src/microhttpd/sha256.c
index 908bbda2..d06b70b2 100644
--- a/src/microhttpd/sha256.c
+++ b/src/microhttpd/sha256.c
@@ -318,8 +318,8 @@ MHD_SHA256_update (void *ctx_,
* @param[out] digest set to the hash, must be #SHA256_DIGEST_SIZE bytes
*/
void
-sha256_finish (void *ctx_,
- uint8_t digest[SHA256_DIGEST_SIZE])
+MHD_SHA256_finish (void *ctx_,
+ uint8_t digest[SHA256_DIGEST_SIZE])
{
struct sha256_ctx *const ctx = ctx_;
uint64_t num_bits; /**< Number of processed bits */
diff --git a/src/microhttpd/sha256.h b/src/microhttpd/sha256.h
index 4a90c233..55962d72 100644
--- a/src/microhttpd/sha256.h
+++ b/src/microhttpd/sha256.h
@@ -87,7 +87,7 @@ MHD_SHA256_update (void *ctx_,
* @param[out] digest set to the hash, must be #SHA256_DIGEST_SIZE bytes
*/
void
-sha256_finish (void *ctx_,
- uint8_t digest[SHA256_DIGEST_SIZE]);
+MHD_SHA256_finish (void *ctx_,
+ uint8_t digest[SHA256_DIGEST_SIZE]);
#endif /* MHD_SHA256_H */
diff --git a/src/microhttpd/test_sha256.c b/src/microhttpd/test_sha256.c
index 7ad5f399..b6904e49 100644
--- a/src/microhttpd/test_sha256.c
+++ b/src/microhttpd/test_sha256.c
@@ -337,7 +337,7 @@ test1_str (void)
MHD_SHA256_init (&ctx);
MHD_SHA256_update (&ctx, (const uint8_t*) data_units1[i].str_l.str,
data_units1[i].str_l.len);
- sha256_finish (&ctx, digest);
+ MHD_SHA256_finish (&ctx, digest);
num_failed += check_result (__FUNCTION__, i, digest,
data_units1[i].digest);
}
@@ -359,7 +359,7 @@ test1_bin (void)
MHD_SHA256_init (&ctx);
MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin,
data_units2[i].bin_l.len);
- sha256_finish (&ctx, digest);
+ MHD_SHA256_finish (&ctx, digest);
num_failed += check_result (__FUNCTION__, i, digest,
data_units2[i].digest);
}
@@ -384,7 +384,7 @@ test2_str (void)
MHD_SHA256_update (&ctx, (const uint8_t*) data_units1[i].str_l.str,
part_s);
MHD_SHA256_update (&ctx, (const uint8_t*) data_units1[i].str_l.str +
part_s,
data_units1[i].str_l.len - part_s);
- sha256_finish (&ctx, digest);
+ MHD_SHA256_finish (&ctx, digest);
num_failed += check_result (__FUNCTION__, i, digest,
data_units1[i].digest);
}
@@ -408,7 +408,7 @@ test2_bin (void)
MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin, part_s);
MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin + part_s,
data_units2[i].bin_l.len - part_s);
- sha256_finish (&ctx, digest);
+ MHD_SHA256_finish (&ctx, digest);
num_failed += check_result (__FUNCTION__, i, digest,
data_units2[i].digest);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (8a9a64a7 -> 714c5735), gnunet, 2021/05/16
- [libmicrohttpd] 01/06: mhd_bithelpers: replaced macro with static function, gnunet, 2021/05/16
- [libmicrohttpd] 03/06: sha256: re-arranged struct members to have better alignment, gnunet, 2021/05/16
- [libmicrohttpd] 05/06: sha256: formatting, cosmetics, typos in comments, gnunet, 2021/05/16
- [libmicrohttpd] 02/06: sha256: renamed one function for clarity and uniformity,
gnunet <=
- [libmicrohttpd] 04/06: sha256: minor optimization, gnunet, 2021/05/16
- [libmicrohttpd] 06/06: Implemented SHA-1 calculation, gnunet, 2021/05/16