Rename concept Key –> BlockKey.
This commit is contained in:
1 parent
611ffa2222
commit
0394c42238
3 files changed
+8
-8
No files matched your search
@@ -4,7 +4,7 @@
|
||||
#include <concepts>
|
||||
#include <type_traits>
|
||||
|
||||
#include "Key.hpp"
|
||||
#include "BlockKey.hpp"
|
||||
#include "Encryptor.hpp"
|
||||
#include "Decryptor.hpp"
|
||||
|
||||
@@ -25,7 +25,7 @@ concept BlockCipher = requires
|
||||
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::KeySize)>>;
|
||||
typename std::integral_constant<decltype(T::KeySize), T::KeySize>;
|
||||
|
||||
requires Key<typename T::Key>;
|
||||
requires BlockKey<typename T::Key>;
|
||||
requires Encryptor<typename T::Encryptor>;
|
||||
requires Decryptor<typename T::Decryptor>;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CHAOS_CIPHER_BLOCK_KEY_HPP
|
||||
#define CHAOS_CIPHER_BLOCK_KEY_HPP
|
||||
#ifndef CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
|
||||
#define CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
|
||||
|
||||
#include <concepts>
|
||||
#include <cstdint>
|
||||
@@ -8,11 +8,11 @@ namespace Chaos::Cipher::Block
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
concept Key = requires
|
||||
concept BlockKey = requires
|
||||
{
|
||||
requires std::constructible_from<T, uint8_t *, uint8_t *>;
|
||||
};
|
||||
|
||||
} // namespace Chaos::Cipher::Block
|
||||
|
||||
#endif // CHAOS_CIPHER_BLOCK_KEY_HPP
|
||||
#endif // CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "Service/ChaosException.hpp"
|
||||
#include "Service/SeArray.hpp"
|
||||
|
||||
#include "Cipher/Block/Key.hpp"
|
||||
#include "Cipher/Block/BlockKey.hpp"
|
||||
#include "Cipher/Block/Encryptor.hpp"
|
||||
#include "Cipher/Block/Decryptor.hpp"
|
||||
#include "Cipher/Block/BlockCipher.hpp"
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
Inner_::RawKey Key_;
|
||||
};
|
||||
|
||||
static_assert(Chaos::Cipher::Block::Key<Key>);
|
||||
static_assert(Chaos::Cipher::Block::BlockKey<Key>);
|
||||
|
||||
class Encryptor
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user