File: crypto-sha1.h

package info (click to toggle)
pam-mysql 0.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,220 kB
  • sloc: ansic: 4,535; python: 102; makefile: 31
file content (20 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * SHA-1 in C
 * By Steve Reid <steve@edmweb.com>
 * 100% Public Domain
 */

#ifndef __SHA1_H__
#define __SHA1_H__ 1

typedef struct {
    crypto_uint4    state[5];
    crypto_uint4    count[2];
    unsigned char   buffer[64];
} SHA1_CTX;

void SHA1Init(SHA1_CTX * context);
void SHA1Update(SHA1_CTX * context, const unsigned char * data, size_t len);
void SHA1Final(unsigned char digest[20], SHA1_CTX * context);

#endif