1/*	$NetBSD: md5.h,v 1.1.1.2 2008/05/20 06:44:25 darrenr Exp $	*/
2
3/*
4 ***********************************************************************
5 ** md5.h -- header file for implementation of MD5                    **
6 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
7 ** Created: 2/17/90 RLR                                              **
8 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
9 ** Revised (for MD5): RLR 4/27/91                                    **
10 **   -- G modified to have y&~z instead of y&z                       **
11 **   -- FF, GG, HH modified to add in last register done             **
12 **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
13 **   -- distinct additive constant for each step                     **
14 **   -- round 4 added, working mod 7                                 **
15 ***********************************************************************
16 */
17
18/*
19 ***********************************************************************
20 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **
21 **                                                                   **
22 ** License to copy and use this software is granted provided that    **
23 ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **
24 ** Digest Algorithm" in all material mentioning or referencing this  **
25 ** software or this function.                                        **
26 **                                                                   **
27 ** License is also granted to make and use derivative works          **
28 ** provided that such works are identified as "derived from the RSA  **
29 ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **
30 ** material mentioning or referencing the derived work.              **
31 **                                                                   **
32 ** RSA Data Security, Inc. makes no representations concerning       **
33 ** either the merchantability of this software or the suitability    **
34 ** of this software for any particular purpose.  It is provided "as  **
35 ** is" without express or implied warranty of any kind.              **
36 **                                                                   **
37 ** These notices must be retained in any copies of any part of this  **
38 ** documentation and/or software.                                    **
39 ***********************************************************************
40 */
41
42#if !defined(__MD5_INCLUDE__) && !defined(_SYS_MD5_H)
43
44#ifndef __STDC__
45# undef		const
46# define	const
47#endif
48
49/* typedef a 32-bit type */
50typedef unsigned int UINT4;
51
52/* Data structure for MD5 (Message-Digest) computation */
53typedef struct {
54  UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */
55  UINT4 buf[4];                                    /* scratch buffer */
56  unsigned char in[64];                              /* input buffer */
57  unsigned char digest[16];     /* actual digest after MD5Final call */
58} MD5_CTX;
59
60extern void MD5Init(MD5_CTX *);
61extern void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
62extern void MD5Final(unsigned char *, MD5_CTX *);
63
64#define __MD5_INCLUDE__
65#endif /* __MD5_INCLUDE__ */
66