From e44911827e18256a732081be5b103717fbb4f80b Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Sun, 21 May 2023 17:08:54 +0200 Subject: [PATCH] util: mark externally-unused functions as static These functions aren't used outside of sha1.c, so let's remove the prototypes from the header-file, and mark the definitions as static. Reviewed-by: David Heidelberg Part-of: --- src/util/sha1/sha1.c | 4 ++-- src/util/sha1/sha1.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/sha1/sha1.c b/src/util/sha1/sha1.c index 4fe2aa7..de7514c 100644 --- a/src/util/sha1/sha1.c +++ b/src/util/sha1/sha1.c @@ -51,7 +51,7 @@ typedef union { /* * Hash a single 512-bit block. This is the core of the algorithm. */ -void +static void SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH]) { uint32_t a, b, c, d, e; @@ -144,7 +144,7 @@ SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len) /* * Add padding and return the message digest. */ -void +static void SHA1Pad(SHA1_CTX *context) { uint8_t finalcount[8]; diff --git a/src/util/sha1/sha1.h b/src/util/sha1/sha1.h index 029a0ae..df534b5 100644 --- a/src/util/sha1/sha1.h +++ b/src/util/sha1/sha1.h @@ -27,8 +27,6 @@ typedef struct _SHA1_CTX { } SHA1_CTX; void SHA1Init(SHA1_CTX *); -void SHA1Pad(SHA1_CTX *); -void SHA1Transform(uint32_t [5], const uint8_t [SHA1_BLOCK_LENGTH]); void SHA1Update(SHA1_CTX *, const uint8_t *, size_t); void SHA1Final(uint8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *); -- 2.7.4