aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/aes_ssse3
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-26 11:28:13 +0200
committerSimon Warta <[email protected]>2015-06-27 11:15:18 +0200
commit4b70dbf7c24dc4f60349e96220601f6c55c81c52 (patch)
treeb20cb7ace806a5937444a926d597987588a9856b /src/lib/block/aes_ssse3
parent922336151782c42455d08cca787215b0a4e7b617 (diff)
lib/block: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/block/aes_ssse3')
-rw-r--r--src/lib/block/aes_ssse3/aes_ssse3.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/block/aes_ssse3/aes_ssse3.cpp b/src/lib/block/aes_ssse3/aes_ssse3.cpp
index b9731d010..f0d506b6e 100644
--- a/src/lib/block/aes_ssse3/aes_ssse3.cpp
+++ b/src/lib/block/aes_ssse3/aes_ssse3.cpp
@@ -348,7 +348,7 @@ void AES_128_SSSE3::encrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&EK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(EK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -365,7 +365,7 @@ void AES_128_SSSE3::decrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&DK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(DK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -387,8 +387,8 @@ void AES_128_SSSE3::key_schedule(const byte keyb[], size_t)
EK.resize(11*4);
DK.resize(11*4);
- __m128i* EK_mm = reinterpret_cast<__m128i*>(&EK[0]);
- __m128i* DK_mm = reinterpret_cast<__m128i*>(&DK[0]);
+ __m128i* EK_mm = reinterpret_cast<__m128i*>(EK.data());
+ __m128i* DK_mm = reinterpret_cast<__m128i*>(DK.data());
_mm_storeu_si128(DK_mm + 10, _mm_shuffle_epi8(key, sr[2]));
@@ -426,7 +426,7 @@ void AES_192_SSSE3::encrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&EK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(EK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -443,7 +443,7 @@ void AES_192_SSSE3::decrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&DK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(DK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -463,8 +463,8 @@ void AES_192_SSSE3::key_schedule(const byte keyb[], size_t)
EK.resize(13*4);
DK.resize(13*4);
- __m128i* EK_mm = reinterpret_cast<__m128i*>(&EK[0]);
- __m128i* DK_mm = reinterpret_cast<__m128i*>(&DK[0]);
+ __m128i* EK_mm = reinterpret_cast<__m128i*>(EK.data());
+ __m128i* DK_mm = reinterpret_cast<__m128i*>(DK.data());
__m128i key1 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(keyb));
__m128i key2 = _mm_loadu_si128(reinterpret_cast<const __m128i*>((keyb + 8)));
@@ -533,7 +533,7 @@ void AES_256_SSSE3::encrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&EK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(EK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -550,7 +550,7 @@ void AES_256_SSSE3::decrypt_n(const byte in[], byte out[], size_t blocks) const
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
- const __m128i* keys = reinterpret_cast<const __m128i*>(&DK[0]);
+ const __m128i* keys = reinterpret_cast<const __m128i*>(DK.data());
for(size_t i = 0; i != blocks; ++i)
{
@@ -570,8 +570,8 @@ void AES_256_SSSE3::key_schedule(const byte keyb[], size_t)
EK.resize(15*4);
DK.resize(15*4);
- __m128i* EK_mm = reinterpret_cast<__m128i*>(&EK[0]);
- __m128i* DK_mm = reinterpret_cast<__m128i*>(&DK[0]);
+ __m128i* EK_mm = reinterpret_cast<__m128i*>(EK.data());
+ __m128i* DK_mm = reinterpret_cast<__m128i*>(DK.data());
__m128i key1 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(keyb));
__m128i key2 = _mm_loadu_si128(reinterpret_cast<const __m128i*>((keyb + 16)));