summaryrefslogtreecommitdiff
path: root/integer.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-08 19:57:39 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-08 19:57:39 -0400
commit42085eea4194c10be60caab7ca3626ecb9716b19 (patch)
tree85c4066ef6698dd9c8aea8f2310747bf6539602b /integer.h
parent9f5d7b9ca8723ad60c9110ee66b50c231d03ecf7 (diff)
downloadcryptopp-git-42085eea4194c10be60caab7ca3626ecb9716b19.tar.gz
Change alignment of IntegerSecBlock to 16 when CRYPTOPP_WORD128_AVAILABLE is in effect (Issue 256)
Diffstat (limited to 'integer.h')
-rw-r--r--integer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/integer.h b/integer.h
index 28a50352..ffd8bce6 100644
--- a/integer.h
+++ b/integer.h
@@ -18,7 +18,12 @@ struct InitializeInteger
InitializeInteger();
};
+// http://github.com/weidai11/cryptopp/issues/256
+#if defined(CRYPTOPP_WORD128_AVAILABLE)
+typedef SecBlock<word, AllocatorWithCleanup<word, true> > IntegerSecBlock;
+#else
typedef SecBlock<word, AllocatorWithCleanup<word, CRYPTOPP_BOOL_X86> > IntegerSecBlock;
+#endif
//! \brief Multiple precision integer with arithmetic operations
//! \details The Integer class can represent positive and negative integers