source: project/release/5/sha1/trunk/sha1.h @ 35839

Last change on this file since 35839 was 35839, checked in by kon, 13 months ago

C5 initial

File size: 543 bytes
Line 
1/*
2 * SHA-1 in C
3 * By Steve Reid <steve@edmweb.com>
4 * 100% Public Domain
5 */
6
7#define SHA1_BLOCK_LENGTH       64
8#define SHA1_DIGEST_LENGTH      20
9
10typedef struct {
11        uint32_t state[5];
12        uint32_t count[2]; 
13        uint8_t buffer[SHA1_BLOCK_LENGTH];
14} SHA1_CTX;
15 
16static void     SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH]);
17static void     SHA1Init(SHA1_CTX *context);
18static void     SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len);
19static void     SHA1Final(SHA1_CTX *context, uint8_t digest[SHA1_DIGEST_LENGTH]);
Note: See TracBrowser for help on using the repository browser.