diff --git a/misc.h b/misc.h index d9f98cad..e540da0d 100644 --- a/misc.h +++ b/misc.h @@ -2077,15 +2077,15 @@ private: //! \tparam T class or type //! \tparam B enumeration indicating endianess //! \tparam A flag indicating alignment -//! \details GetBlock() provides alternate write access to a block of memory. The enumeration B is +//! \details PutBlock() provides alternate write access to a block of memory. The enumeration B is //! BigEndian or LittleEndian. The flag A indicates if the memory block is aligned for class or type T. //! Repeatedly applying operator() results in advancing in the block of memory. -//! \details An example of reading two word32 values from a block of memory is shown below. w1 -//! will be 0x03020100 and w1 will be 0x07060504. +//! \details An example of writing two word32 values from a block of memory is shown below. After the code +//! executes, the byte buffer will be {0,1,2,3,4,5,6,7}. //!
-//!    word32 w1, w2;
-//!    byte buffer[8] = {0,1,2,3,4,5,6,7};
-//!    GetBlock block(buffer);
+//!    word32 w1=0x03020100, w2=0x07060504;
+//!    byte buffer[8];
+//!    PutBlock block(NULL, buffer);
 //!    block(w1)(w2);
 //! 
template diff --git a/rijndael.cpp b/rijndael.cpp index 71fa1b85..46396205 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -217,9 +217,9 @@ void Rijndael::Base::UncheckedSetKey(const byte *userKey, unsigned int keylen, c word32 *rk = m_key; -#if (CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE && (!defined(_MSC_VER) || _MSC_VER >= 1600 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)) +#if (CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE && CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE && (!defined(_MSC_VER) || _MSC_VER >= 1600 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)) // MSVC 2008 SP1 generates bad code for _mm_extract_epi32() when compiling for X64 - if (HasAESNI()) + if (HasAESNI() && HasSSE4()) { static const word32 rcLE[] = { 0x01, 0x02, 0x04, 0x08,