blob: c3c51aa4d487f2e85c02b0257c1f0b57d6158d76 [file] [log] [blame]
Paul Mackerrasa6ef3512005-04-22 23:08:43 -07001/*
2 * SHA-1 implementation.
3 *
4 * Copyright (C) 2005 Paul Mackerras <paulus@samba.org>
5 */
6#include <stdint.h>
7
8typedef struct sha_context {
9 uint32_t hash[5];
10 uint32_t cnt;
11 uint64_t len;
12 union {
13 unsigned char b[64];
14 uint64_t l[8];
15 } buf;
16} SHA_CTX;
17
18int SHA1_Init(SHA_CTX *c);
19int SHA1_Update(SHA_CTX *c, const void *p, unsigned long n);
20int SHA1_Final(unsigned char *hash, SHA_CTX *c);