aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cxx')
-rw-r--r--cxx/include/aesxx/api.hpp12
-rw-r--r--cxx/include/aesxx/mode.hpp6
2 files changed, 9 insertions, 9 deletions
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<algorithm>::RoundKeys& encryption_keys,
typename Types<algorithm>::RoundKeys& decryption_keys);
- template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline 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<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline 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<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline void encrypt_block(
const typename Types<algorithm>::Block& plaintext,
const typename Types<algorithm>::RoundKeys& round_keys,
@@ -89,20 +89,20 @@ namespace aes
encrypt_block<algorithm, mode>(plaintext, round_keys, ciphertext);
}
- template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline 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<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline 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<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr>
+ template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitVector<mode>::value>::type* = nullptr>
inline void decrypt_block(
const typename Types<algorithm>::Block& ciphertext,
const typename Types<algorithm>::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 <Mode mode>
- struct ModeRequiresInitializationVector : public std::true_type
+ struct ModeRequiresInitVector : public std::true_type
{ };
template <>
- struct ModeRequiresInitializationVector<AES_ECB> : public std::false_type
+ struct ModeRequiresInitVector<AES_ECB> : public std::false_type
{ };
template <Mode mode>
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;
}