From 34c6fae0ca405cddf2d60e76d785fc520d336582 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:17:51 +0100 Subject: Replace sha1 with sha256 in utils_base --- lib/utils_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/utils_base.c') diff --git a/lib/utils_base.c b/lib/utils_base.c index 08fa215c..eb1823bb 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c @@ -402,20 +402,20 @@ int mp_translate_state (char *state_text) { * parse of argv, so that uniqueness in parameters are reflected there. */ char *_np_state_generate_key() { - struct sha1_ctx ctx; + struct sha256_ctx ctx; int i; char **argv = this_monitoring_plugin->argv; unsigned char result[20]; char keyname[41]; char *p=NULL; - sha1_init_ctx(&ctx); + sha256_init_ctx(&ctx); for(i=0; iargc; i++) { - sha1_process_bytes(argv[i], strlen(argv[i]), &ctx); + sha256_process_bytes(argv[i], strlen(argv[i]), &ctx); } - sha1_finish_ctx(&ctx, &result); + sha256_finish_ctx(&ctx, &result); for (i=0; i<20; ++i) { sprintf(&keyname[2*i], "%02x", result[i]); -- cgit v1.2.3-74-g34f1