Update concept Encryptor: require T::BlockSize and T::KeySize to be

constant expressions.
This commit is contained in:
hashlag committed 2026-09-12 02:58:05 +03:00
1 parent 97aeb229ad
commit 4e28752614
1 file changed
+2
+2
View File
@@ -18,7 +18,9 @@ concept Encryptor = requires(const T constEncryptor,
typename T::Key;
requires std::constructible_from<T, typename T::Key>;
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::BlockSize)>>;
typename std::integral_constant<decltype(T::BlockSize), T::BlockSize>;
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::KeySize)>>;
typename std::integral_constant<decltype(T::KeySize), T::KeySize>;
constEncryptor.EncryptBlock(outBegin, outEnd, inBegin, inEnd);
{ constEncryptor.EncryptBlock(block) } -> std::same_as<typename T::Block>;
{ constEncryptor.GetBlockSize() } -> std::unsigned_integral;