SNMP++
3.3.4
Main Page
Classes
Files
File List
File Members
sha.h
Go to the documentation of this file.
1
/*_############################################################################
2
_##
3
_## sha.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
#include "
snmp_pp/config_snmp_pp.h
"
29
30
#if !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
31
32
// $Id: sha.h 2359 2013-05-09 20:07:01Z fock $
33
/****************************************************************
34
* SHS.h - Secure Hash Standard (draft) FIPS 180-1 *
35
* *
36
* Copyright (C) 1994 Uri Blumenthal, uri@watson.ibm.com *
37
* Copyright (C) 1994 IBM T. J. Watson esearch Center *
38
* *
39
* Feel free to use this code, as long as you acknowledge the *
40
* ownership by U. Blumenthal and IBM Corp. and agree to hold *
41
* both harmless in case of ANY problem you may have with this *
42
* code. *
43
****************************************************************/
44
#ifdef SNMP_PP_NAMESPACE
45
namespace
Snmp_pp {
46
#endif
47
48
typedef
struct
{
49
/* Message Digest words */
50
unsigned
long
int
h[5];
51
/* Message length in bits */
52
unsigned
long
int
count[2];
53
/* Current byte position in not-full-yet buf */
54
int
index
;
55
/* Buffer for the remainder of bytes mod 64 */
56
unsigned
char
X[64];
57
}
SHA_CTX
;
58
59
DLLOPT
void
SHAInit
(
SHA_CTX
*ctx);
60
DLLOPT
void
SHAUpdate
(
SHA_CTX
*ctx,
const
unsigned
char
*buf,
unsigned
int
lenBuf);
61
DLLOPT
void
SHAFinal
(
unsigned
char
*digest,
SHA_CTX
*ctx);
62
63
#ifdef SNMP_PP_NAMESPACE
64
}
// end of namespace Snmp_pp
65
#endif
66
67
#endif // !defined(_USE_LIBTOMCRYPT) && !defined(_USE_OPENSSL)
68
SHAUpdate
DLLOPT void SHAUpdate(SHA_CTX *ctx, const unsigned char *buf, unsigned int lenBuf)
SHA_CTX
Definition:
sha.h:48
DLLOPT
#define DLLOPT
Definition:
config_snmp_pp.h:49
config_snmp_pp.h
SHAFinal
DLLOPT void SHAFinal(unsigned char *digest, SHA_CTX *ctx)
SHAInit
DLLOPT void SHAInit(SHA_CTX *ctx)
SHA_CTX::index
int index
Definition:
sha.h:54
include
snmp_pp
sha.h
Generated on Wed Feb 11 2015 20:48:56 for SNMP++ by
1.8.6