summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-02 02:39:17 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-02 02:39:17 +0000
commitcaf9e032e6b4ccb114a74a3936c916bcfaba262d (patch)
tree0fecaa7a6728d07549a41864ea2cedfb245f0bd3 /config.h
parent4e4793cc591e26c788b53c487bee7cab2d377f5e (diff)
downloadcryptopp-caf9e032e6b4ccb114a74a3936c916bcfaba262d.tar.gz
changes for 5.6:
- added AuthenticatedSymmetricCipher interface class and Filter wrappers - added CCM, GCM (with SSE2 assembly), CMAC, and SEED - improved AES speed on x86 and x64 - removed WORD64_AVAILABLE; compiler 64-bit int support is now required git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@433 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'config.h')
-rw-r--r--config.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/config.h b/config.h
index c6ee26c..2805953 100644
--- a/config.h
+++ b/config.h
@@ -104,7 +104,6 @@ NAMESPACE_BEGIN(CryptoPP)
typedef unsigned short word16;
typedef unsigned int word32;
-#define WORD64_AVAILABLE
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef unsigned __int64 word64;
#define W64LIT(x) x##ui64
@@ -114,13 +113,8 @@ typedef unsigned int word32;
#endif
// define large word type, used for file offsets and such
-#ifdef WORD64_AVAILABLE
- typedef word64 lword;
- const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
-#else
- typedef word32 lword;
- const lword LWORD_MAX = 0xffffffffUL;
-#endif
+typedef word64 lword;
+const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
#ifdef __GNUC__
#define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
@@ -147,17 +141,17 @@ typedef unsigned int word32;
typedef word32 word;
typedef word64 dword;
#endif
- #elif defined(WORD64_AVAILABLE)
- #define CRYPTOPP_SLOW_WORD64 // use alternative code that avoids word64
+ #else
+ // being here means the native register size is probably 32 bits or less
+ #define CRYPTOPP_BOOL_SLOW_WORD64 1
typedef word16 hword;
typedef word32 word;
typedef word64 dword;
- #else
- typedef byte hword;
- typedef word16 word;
- typedef word32 dword;
#endif
#endif
+#ifndef CRYPTOPP_BOOL_SLOW_WORD64
+ #define CRYPTOPP_BOOL_SLOW_WORD64 0
+#endif
const unsigned int WORD_SIZE = sizeof(word);
const unsigned int WORD_BITS = WORD_SIZE * 8;
@@ -336,11 +330,11 @@ NAMESPACE_END
#define CRYPTOPP_BOOL_X86 0
#endif
-#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
#define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
#endif
-#define CRYPTOPP_VERSION 553
+#define CRYPTOPP_VERSION 560
// ***************** determine availability of OS features ********************
@@ -354,7 +348,7 @@ NAMESPACE_END
#define CRYPTOPP_UNIX_AVAILABLE
#endif
-#if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE))
+#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
# define HIGHRES_TIMER_AVAILABLE
#endif