diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-07-27 23:45:04 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-07-27 23:45:04 +0200 |
commit | bb078fd01e6568982044e0f846029b9670f7f6df (patch) | |
tree | 3d262bd23749c977a18542096515b0c9144dd5d2 /cxx/include/aesxx/api.hpp | |
parent | test: support running scripts from other dirs (diff) | |
download | aes-tools-bb078fd01e6568982044e0f846029b9670f7f6df.tar.gz aes-tools-bb078fd01e6568982044e0f846029b9670f7f6df.zip |
code style
Diffstat (limited to '')
-rw-r--r-- | cxx/include/aesxx/api.hpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/cxx/include/aesxx/api.hpp b/cxx/include/aesxx/api.hpp index 789320f..68112bf 100644 --- a/cxx/include/aesxx/api.hpp +++ b/cxx/include/aesxx/api.hpp @@ -66,20 +66,23 @@ namespace aes const typename Types<algorithm>::RoundKeys& encryption_keys, typename Types<algorithm>::RoundKeys& decryption_keys); - template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr> void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& iv, typename Types<algorithm>::Block& ciphertext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& ciphertext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, @@ -89,20 +92,23 @@ namespace aes encrypt_block<algorithm, mode>(plaintext, round_keys, ciphertext); } - template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr> void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& iv, typename Types<algorithm>::Block& plaintext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& plaintext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> + template <Algorithm algorithm, Mode mode, + typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr> void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, @@ -117,7 +123,7 @@ namespace aes { EncryptWrapper( const typename Types<algorithm>::Key& key, - const typename Types<algorithm>::Block& iv) : iv(iv) + const typename Types<algorithm>::Block& iv) : iv{iv} { expand_key<algorithm>(key, encryption_keys); } @@ -139,7 +145,7 @@ namespace aes { DecryptWrapper( const typename Types<algorithm>::Key& key, - const typename Types<algorithm>::Block& iv) : iv(iv) + const typename Types<algorithm>::Block& iv) : iv{iv} { typename Types<algorithm>::RoundKeys encryption_keys; expand_key<algorithm>(key, encryption_keys); |