> It seems there is a bug in IteratedHashBase (or in HashFilter) when
> using with putMessage=true.
>
> filters.cpp: 717
> size_t HashFilter::Put2(const byte *inString, size_t length, int
> messageEnd, bool blocking)
Here is a minimal example:
string data(
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789"
"0123456789");
string output;
SHA1 sha;
stringstream source;
FileSource filter(source, false, new HashFilter(sha, new
StringSink(output), true));
source << data.substr(0, 62);
filter.Pump();
source.clear();
source.str("");
source << data.substr(62);
filter.Pump();
source.clear();
source.str("");
filter.AttachedTransformation()->MessageEnd();
cout << output.substr(0, 70) << endl;
The output is
0123456789012345678901234567890123456789012345678901234567890110456789
(with line breaks for readability)
0123456789
0123456789
0123456789
0123456789
0123456789
0123456789
0110456789
Note byte 63, 64 are actually 61, 62 in reverse order.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---