Make sure to use pretty-printed checksums in JSON blobs; remove semicolons

refs #4991
This commit is contained in:
Gunnar Beutner 2017-03-20 10:35:20 +01:00 committed by Michael Friedrich
parent 2d9be77260
commit c64d296edb
1 changed files with 3 additions and 8 deletions

View File

@ -38,25 +38,20 @@ String RedisWriter::FormatCheckSumBinary(const String& str)
String RedisWriter::CalculateCheckSumString(const String& str)
{
return SHA1(str, true);
return SHA1(str);
}
String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups)
{
String output;
bool first = true;
ObjectLock olock(groups);
for (const String& group : groups) {
if (first)
first = false;
else
output += ";";
output += SHA1(group, true); //binary checksum required here
}
return SHA1(output, false);
return SHA1(output);
}
String RedisWriter::CalculateCheckSumAttrs(const Dictionary::Ptr& attrs)