summaryrefslogtreecommitdiff
path: root/integer.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
commit572fe07633123ce38abf28c6426356e37aef3a99 (patch)
tree0536d87e504a82920156c239bc5ae6aa43e70ebc /integer.cpp
parent3e8c979ddc194e043567c036321e67c89f847362 (diff)
downloadcryptopp-572fe07633123ce38abf28c6426356e37aef3a99.tar.gz
create DLL version, fix GetNextIV() bug in CTR and OFB modes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'integer.cpp')
-rw-r--r--integer.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/integer.cpp b/integer.cpp
index 260f6f0..bf7508c 100644
--- a/integer.cpp
+++ b/integer.cpp
@@ -2,6 +2,9 @@
// contains public domain code contributed by Alister Lee and Leonard Janke
#include "pch.h"
+
+#ifndef CRYPTOPP_IMPORTS
+
#include "integer.h"
#include "modarith.h"
#include "nbtheory.h"
@@ -20,9 +23,6 @@
#pragma message("You do no seem to have the Visual C++ Processor Pack installed, so use of SSE2 intrinsics will be disabled.")
#endif
-#include "algebra.cpp"
-#include "eprecomp.cpp"
-
NAMESPACE_BEGIN(CryptoPP)
bool FunctionAssignIntToInteger(const std::type_info &valueType, void *pInteger, const void *pInt)
@@ -58,8 +58,6 @@ void AlignedAllocator<T>::deallocate(void *p, size_type n)
#endif
delete [] p;
}
-
-template class AlignedAllocator<word>;
#endif
#define MAKE_DWORD(lowWord, highWord) ((dword(highWord)<<WORD_BITS) | (lowWord))
@@ -752,6 +750,11 @@ static bool GetSSE2Capability()
bool g_sse2DetectionDone = false, g_sse2Detected, g_sse2Enabled = true;
+void DisableSSE2()
+{
+ g_sse2Enabled = false;
+}
+
static inline bool HasSSE2()
{
if (g_sse2Enabled && !g_sse2DetectionDone)
@@ -4001,6 +4004,6 @@ const Integer& MontgomeryRepresentation::MultiplicativeInverse(const Integer &a)
return result;
}
-template class AbstractRing<Integer>;
-
NAMESPACE_END
+
+#endif