Skip to content

Commit

Permalink
sha1: hide SHA1_CTX
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Nov 12, 2022
1 parent ef8f8ca commit 23a01aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 23a01aa

Please sign in to comment.