From a015fbe6735694824b4dae5cc22555a6fde70050 Mon Sep 17 00:00:00 2001 From: hashlag Date: Sat, 12 Sep 2026 02:34:00 +0300 Subject: [PATCH] Update concept Encryptor: require const methods. --- Chaos/Cipher/Block/Encryptor.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Chaos/Cipher/Block/Encryptor.hpp b/Chaos/Cipher/Block/Encryptor.hpp index 3c8ada7..13626dc 100644 --- a/Chaos/Cipher/Block/Encryptor.hpp +++ b/Chaos/Cipher/Block/Encryptor.hpp @@ -9,7 +9,7 @@ namespace Chaos::Cipher::Block { template -concept Encryptor = requires(T encryptor, +concept Encryptor = requires(const T constEncryptor, typename T::Block block, uint8_t * outBegin, uint8_t * outEnd, uint8_t * inBegin, uint8_t * inEnd) @@ -19,9 +19,9 @@ concept Encryptor = requires(T encryptor, requires std::constructible_from; requires std::unsigned_integral>; requires std::unsigned_integral>; - encryptor.EncryptBlock(outBegin, outEnd, inBegin, inEnd); - { encryptor.EncryptBlock(block) } -> std::same_as; - { encryptor.GetBlockSize() } -> std::unsigned_integral; + constEncryptor.EncryptBlock(outBegin, outEnd, inBegin, inEnd); + { constEncryptor.EncryptBlock(block) } -> std::same_as; + { constEncryptor.GetBlockSize() } -> std::unsigned_integral; }; } // namespace Chaos::Cipher::Block