diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 17:09:44 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 17:09:44 +0300 |
commit | 3709911c8ddbb3b7e8e1bbb9109784ec6c625a8a (patch) | |
tree | 17aeb9f429bc3fb1ebadf38681ef48cd9f6f5829 /include | |
parent | /SAFESEH for the asm implementation (diff) | |
download | aes-tools-3709911c8ddbb3b7e8e1bbb9109784ec6c625a8a.tar.gz aes-tools-3709911c8ddbb3b7e8e1bbb9109784ec6c625a8a.zip |
add extern "C" {
Diffstat (limited to '')
-rw-r--r-- | include/aesni/block.h | 9 | ||||
-rw-r--r-- | include/aesni/buffer.h | 9 | ||||
-rw-r--r-- | include/aesni/data.h | 9 | ||||
-rw-r--r-- | include/aesni/raw.h | 9 |
4 files changed, 36 insertions, 0 deletions
diff --git a/include/aesni/block.h b/include/aesni/block.h index ea11817..6de2632 100644 --- a/include/aesni/block.h +++ b/include/aesni/block.h @@ -11,6 +11,11 @@ #include "data.h" #include "raw.h" +#ifdef __cplusplus +extern "C" +{ +#endif + static __inline void __fastcall aes128_expand_key_schedule( AesBlock128 key, Aes128KeySchedule* key_schedule) @@ -364,3 +369,7 @@ static __inline AesBlock128 __fastcall aes256ctr_decrypt_block( init_vector = aes128_be2le(init_vector); return _mm_xor_si128(cipher, raw_aes256_encrypt_block(init_vector, key_schedule)); } + +#ifdef __cplusplus +} +#endif diff --git a/include/aesni/buffer.h b/include/aesni/buffer.h index aa6f5f0..c0a3805 100644 --- a/include/aesni/buffer.h +++ b/include/aesni/buffer.h @@ -10,6 +10,11 @@ #include <stdio.h> +#ifdef __cplusplus +extern "C" +{ +#endif + size_t aes128ecb_encrypt_buffer( const unsigned char* src, size_t src_size, @@ -20,3 +25,7 @@ size_t aes128ecb_decrypt_buffer( size_t src_size, unsigned char* dest, Aes128KeySchedule* inverted_schedule); + +#ifdef __cplusplus +} +#endif diff --git a/include/aesni/data.h b/include/aesni/data.h index 73b7f6e..d104f9d 100644 --- a/include/aesni/data.h +++ b/include/aesni/data.h @@ -11,6 +11,11 @@ #include <emmintrin.h> #include <tmmintrin.h> +#ifdef __cplusplus +extern "C" +{ +#endif + typedef __m128i AesBlock128; static __inline AesBlock128 load_aes_block128(const unsigned char* src) @@ -151,3 +156,7 @@ int parse_aes_block256_le(AesBlock256*, const char*); int parse_aes_block128_be(AesBlock128*, const char*); int parse_aes_block192_be(AesBlock192*, const char*); int parse_aes_block256_be(AesBlock256*, const char*); + +#ifdef __cplusplus +} +#endif diff --git a/include/aesni/raw.h b/include/aesni/raw.h index 6ea0c8a..562ac0c 100644 --- a/include/aesni/raw.h +++ b/include/aesni/raw.h @@ -10,6 +10,11 @@ #include "data.h" +#ifdef __cplusplus +extern "C" +{ +#endif + void __fastcall raw_aes128_expand_key_schedule( AesBlock128 key, Aes128KeySchedule* key_schedule); @@ -53,3 +58,7 @@ AesBlock128 __fastcall raw_aes256_encrypt_block( AesBlock128 __fastcall raw_aes256_decrypt_block( AesBlock128 cipher, Aes256KeySchedule* inverted_schedule); + +#ifdef __cplusplus +} +#endif |