]> git.saurik.com Git - apple/security.git/blob - AppleCSP/MiscCSPAlgs/SHA1_priv.h
Security-28.tar.gz
[apple/security.git] / AppleCSP / MiscCSPAlgs / SHA1_priv.h
1 /* Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
2 *
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE COMPUTER, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE COMPUTER,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
10 *
11 * SHA1_priv.h - private low-level API for SHA-1 hash algorithm
12 *
13 * Revision History
14 * ----------------
15 * 22 Aug 96 Doug Mitchell at NeXT
16 * Created.
17 */
18
19 /* Useful defines/typedefs */
20
21 #ifndef _CK_SHA1_PRIV_H_
22 #define _CK_SHA1_PRIV_H_
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef unsigned char BYTE;
29 typedef unsigned long LONG;
30
31 /* The SHS block size and message digest sizes, in bytes */
32
33 #define SHS_BLOCKSIZE 64
34 #define SHS_DIGESTSIZE 20
35
36 /* The structure for storing SHS info */
37
38 typedef struct {
39 LONG digest[ 5 ]; /* Message digest */
40 LONG countLo, countHi; /* 64-bit bit count */
41 LONG data[ 80 ]; /* SHS data buffer */
42 } SHS_INFO;
43
44 extern void shsInit(SHS_INFO *shsInfo);
45 extern void shsUpdate(SHS_INFO *shsInfo,
46 const BYTE *buffer,
47 int count);
48 extern void shsFinal(SHS_INFO *shsInfo);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif /* _CK_SHA1_PRIV_H_ */