source: trunk/third/nmh/h/md5.h @ 12455

Revision 12455, 2.3 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * md5.h -- header file for md5 message digest
3 *          taken from RFC-1321/Appendices A.1/A.2
4 *
5 * $Id: md5.h,v 1.1.1.1 1999-02-07 18:14:06 danw Exp $
6 */
7
8/*
9 * RSAREF types and constants
10 */
11
12/*
13 * Use prototypes for nmh/mh
14 */
15#define PROTOTYPES 1
16
17/*
18 * PROTOTYPES should be set to one if and only if the compiler
19 * supports function argument prototyping.  The following makes
20 * PROTOTYPES default to 0 if it has not already been defined
21 * with C compiler flags.
22 */
23#ifndef PROTOTYPES
24#define PROTOTYPES 0
25#endif
26
27/* POINTER defines a generic pointer type */
28typedef unsigned char *POINTER;
29
30/* UINT2 defines a two byte word */
31typedef unsigned short int UINT2;
32
33/* UINT4 defines a four byte word */
34typedef unsigned long int UINT4;
35
36/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
37If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
38  returns an empty list.
39 */
40#if PROTOTYPES
41#define PROTO_LIST(list) list
42#else
43#define PROTO_LIST(list) ()
44#endif
45
46/* MD5.H - header file for MD5C.C
47 */
48
49/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
50rights reserved.
51
52License to copy and use this software is granted provided that it
53is identified as the "RSA Data Security, Inc. MD5 Message-Digest
54Algorithm" in all material mentioning or referencing this software
55or this function.
56
57License is also granted to make and use derivative works provided
58that such works are identified as "derived from the RSA Data
59Security, Inc. MD5 Message-Digest Algorithm" in all material
60mentioning or referencing the derived work.
61
62RSA Data Security, Inc. makes no representations concerning either
63the merchantability of this software or the suitability of this
64software for any particular purpose. It is provided "as is"
65without express or implied warranty of any kind.
66
67These notices must be retained in any copies of any part of this
68documentation and/or software.
69 */
70
71/* MD5 context. */
72typedef struct {
73  UINT4 state[4];                                   /* state (ABCD) */
74  UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
75  unsigned char buffer[64];                         /* input buffer */
76} MD5_CTX;
77
78void MD5Init PROTO_LIST ((MD5_CTX *));
79void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int));
80void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
81
Note: See TracBrowser for help on using the repository browser.