From 0394c4223824159f73de70b646cd570ea8014b1a Mon Sep 17 00:00:00 2001 From: hashlag Date: Sat, 19 Sep 2026 17:55:09 +0300 Subject: [PATCH] =?UTF-8?q?Rename=20concept=20Key=20=E2=80=93>=20BlockKey.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chaos/Cipher/Block/BlockCipher.hpp | 4 ++-- Chaos/Cipher/Block/{Key.hpp => BlockKey.hpp} | 8 ++++---- Chaos/Cipher/Block/Des/DesCrypt.hpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) rename Chaos/Cipher/Block/{Key.hpp => BlockKey.hpp} (57%) diff --git a/Chaos/Cipher/Block/BlockCipher.hpp b/Chaos/Cipher/Block/BlockCipher.hpp index a0fd8cf..d92a9bf 100644 --- a/Chaos/Cipher/Block/BlockCipher.hpp +++ b/Chaos/Cipher/Block/BlockCipher.hpp @@ -4,7 +4,7 @@ #include #include -#include "Key.hpp" +#include "BlockKey.hpp" #include "Encryptor.hpp" #include "Decryptor.hpp" @@ -25,7 +25,7 @@ concept BlockCipher = requires requires std::unsigned_integral>; typename std::integral_constant; - requires Key; + requires BlockKey; requires Encryptor; requires Decryptor; }; diff --git a/Chaos/Cipher/Block/Key.hpp b/Chaos/Cipher/Block/BlockKey.hpp similarity index 57% rename from Chaos/Cipher/Block/Key.hpp rename to Chaos/Cipher/Block/BlockKey.hpp index 22a102e..a412454 100644 --- a/Chaos/Cipher/Block/Key.hpp +++ b/Chaos/Cipher/Block/BlockKey.hpp @@ -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 #include @@ -8,11 +8,11 @@ namespace Chaos::Cipher::Block { template -concept Key = requires +concept BlockKey = requires { requires std::constructible_from; }; } // namespace Chaos::Cipher::Block -#endif // CHAOS_CIPHER_BLOCK_KEY_HPP +#endif // CHAOS_CIPHER_BLOCK_BLOCKKEY_HPP diff --git a/Chaos/Cipher/Block/Des/DesCrypt.hpp b/Chaos/Cipher/Block/Des/DesCrypt.hpp index 978f635..077ea84 100644 --- a/Chaos/Cipher/Block/Des/DesCrypt.hpp +++ b/Chaos/Cipher/Block/Des/DesCrypt.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); + static_assert(Chaos::Cipher::Block::BlockKey); class Encryptor {