2 * SHA-1 Hash Function (FIPS 180-1, RFC 3174)
4 * (c) 2008 Martin Mares <mj@ucw.cz>
6 * Based on the code from libgcrypt-1.2.3, which was:
8 * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
10 * This software may be freely distributed and used according to the terms
11 * of the GNU Lesser General Public License.
24 void sha1_init(sha1_context *hd);
25 void sha1_update(sha1_context *hd, const byte *inbuf, uns inlen);
26 byte *sha1_final(sha1_context *hd);
28 /* One-shot interface */
29 void sha1_hash_buffer(byte *outbuf, const byte *buffer, uns length);
32 void sha1_hmac(byte *outbuf, const byte *key, uns keylen, const byte *data, uns datalen);
35 #define SHA1_HEX_SIZE 41
36 #define SHA1_BLOCK_SIZE 64