summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-10 04:34:23 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-10 04:34:23 +0000
commit5fa8124f5156963e798f5cffa812cb9910e4e8de (patch)
treece43a3a2973d29a78e6b401f7a4a367e914f5490 /sha.cpp
parent3edbf2eff4cb3bc989ba1c442358de0bedbdf90c (diff)
downloadcryptopp-5fa8124f5156963e798f5cffa812cb9910e4e8de.tar.gz
merge in 5.0.4 changes (exclude DES and SHA-2 from DLL),
attempt (failed) to build DLL with GCC git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@90 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/sha.cpp b/sha.cpp
index 4eaae56..a570fb7 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -4,9 +4,6 @@
// Both are in the public domain.
#include "pch.h"
-
-#ifndef CRYPTOPP_IMPORTS
-
#include "sha.h"
#include "misc.h"
@@ -17,6 +14,8 @@ NAMESPACE_BEGIN(CryptoPP)
#define blk0(i) (W[i] = data[i])
#define blk1(i) (W[i&15] = rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1))
+#ifndef CRYPTOPP_IMPORTS
+
void SHA::InitState(HashWordType *state)
{
state[0] = 0x67452301L;
@@ -79,6 +78,8 @@ void SHA::Transform(word32 *state, const word32 *data)
memset(W, 0, sizeof(W));
}
+#endif // #ifndef CRYPTOPP_IMPORTS
+
// end of Steve Reid's code
// *************************************************************
@@ -278,5 +279,3 @@ void SHA384::InitState(HashWordType *state)
#endif
NAMESPACE_END
-
-#endif