From 8fae13fe2c6bd341cbd0081d2e7140509b23c692 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 4 May 2017 03:03:47 +0300 Subject: refactoring --- cxx/include/aesxx/api.hpp | 12 ++++++------ cxx/include/aesxx/mode.hpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'cxx') diff --git a/cxx/include/aesxx/api.hpp b/cxx/include/aesxx/api.hpp index 5d21b63..2d0871f 100644 --- a/cxx/include/aesxx/api.hpp +++ b/cxx/include/aesxx/api.hpp @@ -66,20 +66,20 @@ namespace aes const typename Types::RoundKeys& encryption_keys, typename Types::RoundKeys& decryption_keys); - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, typename Types::Block& iv, typename Types::Block& ciphertext); - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, typename Types::Block& ciphertext); - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, @@ -89,20 +89,20 @@ namespace aes encrypt_block(plaintext, round_keys, ciphertext); } - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, typename Types::Block& iv, typename Types::Block& plaintext); - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, typename Types::Block& plaintext); - template ::value>::type* = nullptr> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, diff --git a/cxx/include/aesxx/mode.hpp b/cxx/include/aesxx/mode.hpp index b6f3192..1c6c4cf 100644 --- a/cxx/include/aesxx/mode.hpp +++ b/cxx/include/aesxx/mode.hpp @@ -14,18 +14,18 @@ namespace aes typedef AES_Mode Mode; template - struct ModeRequiresInitializationVector : public std::true_type + struct ModeRequiresInitVector : public std::true_type { }; template <> - struct ModeRequiresInitializationVector : public std::false_type + struct ModeRequiresInitVector : public std::false_type { }; template struct ModeUsesEncryptionKeysOnly : public std::true_type { }; - inline bool mode_requires_initialization_vector(Mode mode) + inline bool mode_requires_init_vector(Mode mode) { return mode != AES_ECB; } -- cgit v1.2.3