Release bumped to "gts4".
[tac_plus.git] / md5.h
1 #ifndef MD5_H
2 #define MD5_H 1
3
4 #include "tac_plus.h"
5
6 /*
7    Copyright (c) 1995-1998 by Cisco systems, Inc.
8
9    Permission to use, copy, modify, and distribute this software for
10    any purpose and without fee is hereby granted, provided that this
11    copyright and permission notice appear on all copies of the
12    software and supporting documentation, the name of Cisco Systems,
13    Inc. not be used in advertising or publicity pertaining to
14    distribution of the program without specific prior permission, and
15    notice be given in supporting documentation that modification,
16    copying and distribution is by permission of Cisco Systems, Inc.
17
18    Cisco Systems, Inc. makes no representations about the suitability
19    of this software for any purpose.  THIS SOFTWARE IS PROVIDED ``AS
20    IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
21    WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22    FITNESS FOR A PARTICULAR PURPOSE.
23 */
24
25
26 /*
27  * MD5.H - header file for MD5C.C
28  */
29
30 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
31  * rights reserved.
32  *
33  * License to copy and use this software is granted provided that it
34  * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
35  * Algorithm" in all material mentioning or referencing this software
36  * or this function.
37  *
38  * License is also granted to make and use derivative works provided
39  * that such works are identified as "derived from the RSA Data
40  * Security, Inc. MD5 Message-Digest Algorithm" in all material
41  * mentioning or referencing the derived work.
42  *
43  * RSA Data Security, Inc. makes no representations concerning either
44  * the merchantability of this software or the suitability of this
45  * software for any particular purpose. It is provided "as is"
46  * without express or implied warranty of any kind.
47  *
48  * These notices must be retained in any copies of any part of this
49  * documentation and/or software.
50  */
51
52
53 /* delineate the cisco changes to the RSA supplied module */
54 #define CISCO_MD5_MODS
55
56 #if defined(CISCO_MD5_MODS)
57
58 /* typedef a 32-bit type */
59 typedef tac_uint32 UINT4;
60
61 /* typedef a generic pointer type */
62 typedef unsigned char *POINTER;
63
64 #endif /* defined(CISCO_MD5_MODS) */
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
74 extern void MD5Init TAC_ARGS((MD5_CTX *context));
75 extern void MD5Update TAC_ARGS((MD5_CTX *context, unsigned char *input, unsigned int inputLen));
76 extern void MD5Final TAC_ARGS((unsigned char *digest, MD5_CTX *context));
77
78
79 #endif /* MD5_H */