diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 05:22:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-10 05:22:50 +0300 |
commit | 86aaa47b2d1c98bad135d2437c21660ae4cac99a (patch) | |
tree | d62aab7c08b8241499370c71a74415bf063ae7d8 | |
parent | src/aes*.asm -> src/asm/, src/aes*.c -> src/c/ (diff) | |
download | aes-tools-86aaa47b2d1c98bad135d2437c21660ae4cac99a.tar.gz aes-tools-86aaa47b2d1c98bad135d2437c21660ae4cac99a.zip |
BE block I/O by default
-rw-r--r-- | src/common.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/common.c b/src/common.c index fa9def6..c2e7530 100644 --- a/src/common.c +++ b/src/common.c @@ -15,28 +15,28 @@ AesBlockString128 format_aes_block128(AesBlock128* block) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return format_aes_block128_be(block); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return format_aes_block128_le(block); +#else + return format_aes_block128_be(block); #endif } AesBlockString192 format_aes_block192(AesBlock192* block) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return format_aes_block192_be(block); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return format_aes_block192_le(block); +#else + return format_aes_block192_be(block); #endif } AesBlockString256 format_aes_block256(AesBlock256* block) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return format_aes_block256_be(block); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return format_aes_block256_le(block); +#else + return format_aes_block256_be(block); #endif } @@ -271,28 +271,28 @@ void print_aes_block256_be_as_matrix(AesBlock256* block) int parse_aes_block128(AesBlock128* block, const char* src) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return parse_aes_block128_be(block, src); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return parse_aes_block128_le(block, src); +#else + return parse_aes_block128_be(block, src); #endif } int parse_aes_block192(AesBlock192* block, const char* src) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return parse_aes_block192_be(block, src); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return parse_aes_block192_le(block, src); +#else + return parse_aes_block192_be(block, src); #endif } int parse_aes_block256(AesBlock256* block, const char* src) { -#if defined LIBAESNI_BE_IO_BY_DEFAULT && LIBAESNI_BE_IO_BY_DEFAULT - return parse_aes_block256_be(block, src); -#else +#if defined AESNI_LE_BLOCK_IO && AESNI_LE_BLOCK_IO return parse_aes_block256_le(block, src); +#else + return parse_aes_block256_be(block, src); #endif } |