Update concept Encryptor: require T::BlockSize and T::KeySize to be
constant expressions.
This commit is contained in:
1 parent
97aeb229ad
commit
4e28752614
1 file changed
+2
@@ -18,7 +18,9 @@ concept Encryptor = requires(const T constEncryptor,
|
|||||||
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>;
|
||||||
constEncryptor.EncryptBlock(outBegin, outEnd, inBegin, inEnd);
|
constEncryptor.EncryptBlock(outBegin, outEnd, inBegin, inEnd);
|
||||||
{ constEncryptor.EncryptBlock(block) } -> std::same_as<typename T::Block>;
|
{ constEncryptor.EncryptBlock(block) } -> std::same_as<typename T::Block>;
|
||||||
{ constEncryptor.GetBlockSize() } -> std::unsigned_integral;
|
{ constEncryptor.GetBlockSize() } -> std::unsigned_integral;
|
||||||
|
|||||||
Reference in new issue
Block a user