mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
sha1: hide SHA1_CTX
This commit is contained in:
parent
ef8f8caab6
commit
23a01aa227
6
sha1.c
6
sha1.c
@ -60,6 +60,12 @@ A million repetitions of "a"
|
|||||||
z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \
|
z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \
|
||||||
w = rol(w, 30);
|
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 SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
|
||||||
|
|
||||||
static void SHA1Init(SHA1_CTX *context);
|
static void SHA1Init(SHA1_CTX *context);
|
||||||
|
6
sha1.h
6
sha1.h
@ -9,12 +9,6 @@
|
|||||||
|
|
||||||
#include "stdint.h"
|
#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);
|
void builtin_SHA1(char *hash_out, const char *str, int len);
|
||||||
|
|
||||||
#endif /* SHA1_H */
|
#endif /* SHA1_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user