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

constant expressions.
This commit is contained in:
hashlag committed 2026-09-12 03:02:03 +03:00
1 parent 84e9068655
commit ba87a7d149
1 file changed
+5
+5
View File
@@ -17,8 +17,13 @@ concept Decryptor = requires(const T constDecryptor,
typename T::Block; typename T::Block;
typename T::Key; typename T::Key;
requires std::constructible_from<T, typename T::Key>; requires std::constructible_from<T, typename T::Key>;
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::BlockSize)>>; 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)>>; requires std::unsigned_integral<std::remove_cvref_t<decltype(T::KeySize)>>;
typename std::integral_constant<decltype(T::KeySize), T::KeySize>;
constDecryptor.DecryptBlock(outBegin, outEnd, inBegin, inEnd); constDecryptor.DecryptBlock(outBegin, outEnd, inBegin, inEnd);
{ constDecryptor.DecryptBlock(block) } -> std::same_as<typename T::Block>; { constDecryptor.DecryptBlock(block) } -> std::same_as<typename T::Block>;
{ constDecryptor.GetBlockSize() } -> std::unsigned_integral; { constDecryptor.GetBlockSize() } -> std::unsigned_integral;