Decryptor: Require end of the output span to be indicated explicitly.
Usage becomes much less error-prone.
This commit is contained in:
@@ -9,9 +9,10 @@ class Decryptor
|
||||
{
|
||||
public:
|
||||
template<typename OutputIt, typename InputIt>
|
||||
void DecryptBlock(OutputIt out, InputIt inBegin, InputIt inEnd) const
|
||||
void DecryptBlock(OutputIt outBegin, OutputIt outEnd,
|
||||
InputIt inBegin, InputIt inEnd) const
|
||||
{
|
||||
Impl().DecryptBlock(out, inBegin, inEnd);
|
||||
Impl().DecryptBlock(outBegin, outEnd, inBegin, inEnd);
|
||||
}
|
||||
|
||||
template<typename Block>
|
||||
|
||||
@@ -290,7 +290,8 @@ public:
|
||||
{ }
|
||||
|
||||
template<typename OutputIt, typename InputIt>
|
||||
void DecryptBlock(OutputIt out, InputIt inBegin, InputIt inEnd) const
|
||||
void DecryptBlock(OutputIt outBegin, OutputIt outEnd,
|
||||
InputIt inBegin, InputIt inEnd) const
|
||||
{
|
||||
RawBlockArray block;
|
||||
|
||||
@@ -305,7 +306,7 @@ public:
|
||||
block.End()),
|
||||
Schedule_);
|
||||
|
||||
Inner_::Bitwise::CrunchUInt64(out, decrypted);
|
||||
Inner_::Bitwise::CrunchUInt64(outBegin, outEnd, decrypted);
|
||||
}
|
||||
|
||||
Block DecryptBlock(Block block) const
|
||||
|
||||
Reference in New Issue
Block a user