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