SNMP++  3.3.11
md5.h
Go to the documentation of this file.
1 /*_############################################################################
2  _##
3  _## md5.h
4  _##
5  _## SNMP++ v3.3
6  _## -----------------------------------------------
7  _## Copyright (c) 2001-2013 Jochen Katz, Frank Fock
8  _##
9  _## This software is based on SNMP++2.6 from Hewlett Packard:
10  _##
11  _## Copyright (c) 1996
12  _## Hewlett-Packard Company
13  _##
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.
25  _##
26  _##########################################################################*/
27 
28 #ifndef _SNMP_MD5_H_
29 #define _SNMP_MD5_H_
30 
31 #include <libsnmp.h>
32 #include "snmp_pp/config_snmp_pp.h"
33 
34 #if !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
35 
36 /* MD5.H - header file for MD5C.C */
37 
38 /* Copyright (C) 1991, RSA Data Security, Inc. All rights reserved.
39 
40  License to copy and use this software is granted provided that it
41  is identified as the "RSA Data Security, Inc. MD5 Message-Digest
42  Algorithm" in all material mentioning or referencing this software
43  or this function.
44 
45  License is also granted to make and use derivative works provided
46  that such works are identified as "derived from the RSA Data
47  Security, Inc. MD5 Message-Digest Algorithm" in all material
48  mentioning or referencing the derived work.
49 
50  RSA Data Security, Inc. makes no representations concerning either
51  the merchantability of this software or the suitability of this
52  software for any particular purpose. It is provided "as is"
53  without express or implied warranty of any kind.
54 
55  These notices must be retained in any copies of any part of this
56  documentation and/or software.
57  */
58 // $Id$
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 #ifdef SNMP_PP_NAMESPACE
65 namespace Snmp_pp {
66 #endif
67 
68 /* POINTER defines a generic pointer type */
69 typedef unsigned char *POINTER;
70 
71 /* UINT2 defines a two byte word */
72 typedef unsigned short int UINT2;
73 
74 /* UINT4 defines a four byte word */
75 typedef unsigned int UINT4;
76 
77 /* MD5 context. */
78 typedef struct {
79  UINT4 state[4]; /* state (ABCD) */
80  UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
81  unsigned char buffer[64]; /* input buffer */
82 } MD5_CTX;
83 
84 DLLOPT void MD5Init(MD5_CTX *);
85 DLLOPT void MD5Update(MD5_CTX *, const unsigned char *, const unsigned int);
86 DLLOPT void MD5Final(unsigned char [16], MD5_CTX *);
87 
88 #ifdef SNMP_PP_NAMESPACE
89 } // end of namespace Snmp_pp
90 #endif
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif // !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
97 
98 #endif // _SNMP_MD5_H_
#define DLLOPT