diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 03:06:24 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 03:06:24 +0300 |
commit | 82cef11d443c71c7d5ebc92f144c2b7ceb4e1cb2 (patch) | |
tree | 70eed008b868b440b915f1e02d8d8264865fa2e6 /include/aesni/data.h | |
parent | add KAT vectors from the CAVP (diff) | |
download | aes-tools-82cef11d443c71c7d5ebc92f144c2b7ceb4e1cb2.tar.gz aes-tools-82cef11d443c71c7d5ebc92f144c2b7ceb4e1cb2.zip |
add file encryption utils for AES-128-ECB
Diffstat (limited to '')
-rw-r--r-- | include/aesni/data.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/aesni/data.h b/include/aesni/data.h index 0cee7c6..73b7f6e 100644 --- a/include/aesni/data.h +++ b/include/aesni/data.h @@ -13,6 +13,17 @@ typedef __m128i AesBlock128; +static __inline AesBlock128 load_aes_block128(const unsigned char* src) +{ + return _mm_loadu_si128((AesBlock128*) src); +} + +static __inline void __fastcall store_aes_block128(AesBlock128 block, + unsigned char* dest) +{ + _mm_storeu_si128((AesBlock128*) dest, block); +} + static __inline AesBlock128 __fastcall make_aes_block128(int hi3, int hi2, int lo1, int lo0) { return _mm_set_epi32(hi3, hi2, lo1, lo0); |