diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2009-03-03 03:28:39 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2009-03-03 03:28:39 +0000 |
commit | f1b1bf3d0dea2032f9ce5f9b3d29b7ed5d22a32a (patch) | |
tree | bbbd178df43bdc71503320cd87f5ec0c84c9d494 /validat1.cpp | |
parent | 94ee86bbf6d35476281a7012136e7c74c1693231 (diff) | |
download | cryptopp-f1b1bf3d0dea2032f9ce5f9b3d29b7ed5d22a32a.tar.gz |
tweaks/fixes for 5.6
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@435 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'validat1.cpp')
-rw-r--r-- | validat1.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/validat1.cpp b/validat1.cpp index e0aac92..f596928 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -158,6 +158,19 @@ bool TestSettings() pass = false; } +#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS + byte testvals[10] = {1,2,2,3,3,3,3,2,2,1}; + if (*(word32 *)(testvals+3) == 0x03030303 && *(word64 *)(testvals+1) == W64LIT(0x0202030303030202)) + cout << "passed: Your machine allows unaligned data access.\n"; + else + { + cout << "FAILED: Unaligned data access gave incorrect results.\n"; + pass = false; + } +#else + cout << "passed: CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS is not defined. Will restrict to aligned data access.\n"; +#endif + if (sizeof(byte) == 1) cout << "passed: "; else |