Rename concept Key –> BlockKey.

This commit is contained in:
hashlag committed 2026-09-19 17:55:09 +03:00
1 parent 611ffa2222
commit 0394c42238
3 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@
#include <concepts> #include <concepts>
#include <type_traits> #include <type_traits>
#include "Key.hpp" #include "BlockKey.hpp"
#include "Encryptor.hpp" #include "Encryptor.hpp"
#include "Decryptor.hpp" #include "Decryptor.hpp"
@@ -25,7 +25,7 @@ concept BlockCipher = requires
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::KeySize)>>; requires std::unsigned_integral<std::remove_cvref_t<decltype(T::KeySize)>>;
typename std::integral_constant<decltype(T::KeySize), 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 Encryptor<typename T::Encryptor>;
requires Decryptor<typename T::Decryptor>; requires Decryptor<typename T::Decryptor>;
}; };
@@ -1,5 +1,5 @@
#ifndef CHAOS_CIPHER_BLOCK_KEY_HPP #ifndef CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
#define CHAOS_CIPHER_BLOCK_KEY_HPP #define CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
#include <concepts> #include <concepts>
#include <cstdint> #include <cstdint>
@@ -8,11 +8,11 @@ namespace Chaos::Cipher::Block
{ {
template<typename T> template<typename T>
concept Key = requires concept BlockKey = requires
{ {
requires std::constructible_from<T, uint8_t *, uint8_t *>; requires std::constructible_from<T, uint8_t *, uint8_t *>;
}; };
} // namespace Chaos::Cipher::Block } // namespace Chaos::Cipher::Block
#endif // CHAOS_CIPHER_BLOCK_KEY_HPP #endif // CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP
+2 -2
View File
@@ -10,7 +10,7 @@
#include "Service/ChaosException.hpp" #include "Service/ChaosException.hpp"
#include "Service/SeArray.hpp" #include "Service/SeArray.hpp"
#include "Cipher/Block/Key.hpp" #include "Cipher/Block/BlockKey.hpp"
#include "Cipher/Block/Encryptor.hpp" #include "Cipher/Block/Encryptor.hpp"
#include "Cipher/Block/Decryptor.hpp" #include "Cipher/Block/Decryptor.hpp"
#include "Cipher/Block/BlockCipher.hpp" #include "Cipher/Block/BlockCipher.hpp"
@@ -235,7 +235,7 @@ public:
Inner_::RawKey Key_; Inner_::RawKey Key_;
}; };
static_assert(Chaos::Cipher::Block::Key<Key>); static_assert(Chaos::Cipher::Block::BlockKey<Key>);
class Encryptor class Encryptor
{ {