sha1: hide SHA1_CTX

This commit is contained in:
Azat Khuzhin 2022-11-12 16:41:55 +01:00
parent ef8f8caab6
commit 23a01aa227
2 changed files with 6 additions and 6 deletions

6
sha1.c
View File

@ -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);

6
sha1.h
View File

@ -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 */