Encryptor: Require end of the output span to be indicated explicitly.

Usage becomes much less error-prone.
This commit is contained in:
hashlag
2026-02-02 00:52:08 +03:00
parent d194fef1af
commit 67709e5361
3 changed files with 31 additions and 47 deletions

View File

@@ -9,9 +9,10 @@ class Encryptor
{
public:
template<typename OutputIt, typename InputIt>
void EncryptBlock(OutputIt out, InputIt inBegin, InputIt inEnd) const
void EncryptBlock(OutputIt outBegin, OutputIt outEnd,
InputIt inBegin, InputIt inEnd) const
{
Impl().EncryptBlock(out, inBegin, inEnd);
Impl().EncryptBlock(outBegin, outEnd, inBegin, inEnd);
}
template<typename Block>