]> git.stg.codes - ssmd.git/blob - 3rdparty/snmp++/include/snmp_pp/sha.h
Fix build on osx.
[ssmd.git] / 3rdparty / snmp++ / include / snmp_pp / sha.h
1 /*_############################################################################
2   _## 
3   _##  sha.h  
4   _##
5   _##  SNMP++v3.2.25
6   _##  -----------------------------------------------
7   _##  Copyright (c) 2001-2010 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   _##  Stuttgart, Germany, Thu Sep  2 00:07:47 CEST 2010 
27   _##  
28   _##########################################################################*/
29
30 #include "snmp_pp/config_snmp_pp.h"
31
32 #if !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
33
34 // $Id: sha.h 288 2007-03-22 22:37:09Z katz $
35 /****************************************************************
36  * SHS.h  -  Secure Hash Standard (draft) FIPS 180-1            *
37  *                                                              *
38  * Copyright (C) 1994  Uri Blumenthal, uri@watson.ibm.com       *
39  * Copyright (C) 1994  IBM T. J. Watson esearch Center          *
40  *                                                              *
41  * Feel free to use this code, as long as you acknowledge the   *
42  * ownership by U. Blumenthal and IBM Corp. and agree to hold   *
43  * both harmless in case of ANY problem you may have with this  *
44  * code.                                                        *
45  ****************************************************************/
46 #ifdef SNMP_PP_NAMESPACE
47 namespace Snmp_pp {
48 #endif
49
50 typedef struct {
51   /* Message Digest words */
52   unsigned long int h[5];
53   /* Message length in bits */
54   unsigned long int count[2];
55   /* Current byte position in not-full-yet buf */
56   int index;
57   /* Buffer for the remainder of bytes mod 64 */
58   unsigned char X[64];
59 } SHA_CTX;
60
61 DLLOPT void SHAInit(SHA_CTX *ctx);
62 DLLOPT void SHAUpdate(SHA_CTX *ctx, const unsigned char *buf, unsigned int lenBuf);
63 DLLOPT void SHAFinal(unsigned char *digest, SHA_CTX *ctx);
64
65 #ifdef SNMP_PP_NAMESPACE
66 } // end of namespace Snmp_pp
67 #endif 
68
69 #endif // !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
70