]> git.saurik.com Git - apple/security.git/blob - SecureTransport/privateInc/sslmd5.h
Security-29.tar.gz
[apple/security.git] / SecureTransport / privateInc / sslmd5.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 File: sslmd5.h
21
22 Contains: public API to low-level MD5 module
23
24 Written by: Doug Mitchell, based on Netscape RSARef 3.0, based on RSA code
25
26 Copyright: (c) 1999 by Apple Computer, Inc., all rights reserved.
27
28 */
29 /* MD5.H - header file for MD5C.C
30 */
31
32 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
33 rights reserved.
34
35 License to copy and use this software is granted provided that it
36 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
37 Algorithm" in all material mentioning or referencing this software
38 or this function.
39
40 License is also granted to make and use derivative works provided
41 that such works are identified as "derived from the RSA Data
42 Security, Inc. MD5 Message-Digest Algorithm" in all material
43 mentioning or referencing the derived work.
44
45 RSA Data Security, Inc. makes no representations concerning either
46 the merchantability of this software or the suitability of this
47 software for any particular purpose. It is provided "as is"
48 without express or implied warranty of any kind.
49
50 These notices must be retained in any copies of any part of this
51 documentation and/or software.
52 */
53
54 #ifndef _SSL_MD5_H_
55 #define _SSL_MD5_H
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 /* these are from aglobal.h, which we really don't want to compile against */
62 typedef unsigned long int UINT4;
63 #define PROTO_LIST(x) x
64 typedef unsigned char *POINTER;
65
66 /* MD5 context. */
67 typedef struct {
68 UINT4 state[4]; /* state (ABCD) */
69 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
70 unsigned char buffer[64]; /* input buffer */
71 } MD5_CTX;
72
73 void SSLMD5Init PROTO_LIST ((MD5_CTX *));
74 void SSLMD5Update PROTO_LIST
75 ((MD5_CTX *, const unsigned char *, unsigned int));
76 void SSLMD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /* _SSL_MD5_H_ */