1 /*_############################################################################
6 _## -----------------------------------------------
7 _## Copyright (c) 2001-2010 Jochen Katz, Frank Fock
9 _## This software is based on SNMP++2.6 from Hewlett Packard:
11 _## Copyright (c) 1996
12 _## Hewlett-Packard Company
14 _## ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
15 _## Permission to use, copy, modify, distribute and/or sell this software
16 _## and/or its documentation is hereby granted without fee. User agrees
17 _## to display the above copyright notice and this license notice in all
18 _## copies of the software and any documentation of the software. User
19 _## agrees to assume all liability for the use of the software;
20 _## Hewlett-Packard and Jochen Katz make no representations about the
21 _## suitability of this software for any purpose. It is provided
22 _## "AS-IS" without warranty of any kind, either express or implied. User
23 _## hereby grants a royalty-free license to any and all derivatives based
24 _## upon this software code base.
26 _## Stuttgart, Germany, Thu Sep 2 00:07:47 CEST 2010
28 _##########################################################################*/
30 #include "snmp_pp/config_snmp_pp.h"
32 #if !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
34 /* MD5.H - header file for MD5C.C */
36 /* Copyright (C) 1991, RSA Data Security, Inc. All rights reserved.
38 License to copy and use this software is granted provided that it
39 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
40 Algorithm" in all material mentioning or referencing this software
43 License is also granted to make and use derivative works provided
44 that such works are identified as "derived from the RSA Data
45 Security, Inc. MD5 Message-Digest Algorithm" in all material
46 mentioning or referencing the derived work.
48 RSA Data Security, Inc. makes no representations concerning either
49 the merchantability of this software or the suitability of this
50 software for any particular purpose. It is provided "as is"
51 without express or implied warranty of any kind.
53 These notices must be retained in any copies of any part of this
54 documentation and/or software.
56 // $Id: md5.h 288 2007-03-22 22:37:09Z katz $
65 #ifdef SNMP_PP_NAMESPACE
69 /* POINTER defines a generic pointer type */
70 typedef unsigned char *POINTER;
72 /* UINT2 defines a two byte word */
73 typedef unsigned short int UINT2;
75 /* UINT4 defines a four byte word */
76 typedef unsigned int UINT4; /* for alpha */
77 /*typedef unsigned long int UINT4; */
79 /* BYTE defines a unsigned character */
80 typedef unsigned char BYTE;
82 /* internal signed value */
83 typedef signed int signeddigit;
86 #define NULL_PTR ((POINTER)0)
90 #define UNUSED_ARG(x) x = *(&x);
97 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
98 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
99 returns an empty list. */
102 #define PROTO_LIST(list) list
104 #define PROTO_LIST(list) ()
109 UINT4 state[4]; /* state (ABCD) */
110 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
111 unsigned char buffer[64]; /* input buffer */
114 DLLOPT void MD5Init PROTO_LIST ((MD5_CTX *));
115 DLLOPT void MD5Update PROTO_LIST ((MD5_CTX *, const unsigned char *, const unsigned int));
116 DLLOPT void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
118 #ifdef SNMP_PP_NAMESPACE
119 } // end of namespace Snmp_pp
128 #endif // !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)