From 23a01aa22778eba44afd0f5dfeef9bf48a971793 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 12 Nov 2022 16:41:55 +0100 Subject: [PATCH] sha1: hide SHA1_CTX --- sha1.c | 6 ++++++ sha1.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sha1.c b/sha1.c index da159ab79e..c8e23da28f 100644 --- a/sha1.c +++ b/sha1.c @@ -60,6 +60,12 @@ A million repetitions of "a" z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \ w = rol(w, 30); +typedef struct { + uint32_t state[5]; + uint32_t count[2]; + unsigned char buffer[64]; +} SHA1_CTX; + static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); static void SHA1Init(SHA1_CTX *context); diff --git a/sha1.h b/sha1.h index 2e7469cd2e..f5960efc5f 100644 --- a/sha1.h +++ b/sha1.h @@ -9,12 +9,6 @@ #include "stdint.h" -typedef struct { - uint32_t state[5]; - uint32_t count[2]; - unsigned char buffer[64]; -} SHA1_CTX; - void builtin_SHA1(char *hash_out, const char *str, int len); #endif /* SHA1_H */