Bug 1353956 - P1. Rename checksum used in SafeBrowsing V4 to SHA256. r=gcp

SafeBrowsing V4 protocol use SHA-256 as the checksum to check integrity
of update data and also the integrity of prefix files.

SafeBrowsing V2 HashStore use MD5 as the checksum to check integrity of
.sbstore

Since we are going to use CRC32 as the integrity check of V4 prefix files,
I think rename V4 "checksum" to SHA256 can improve readability.

Differential Revision: https://phabricator.services.mozilla.com/D21460
This commit is contained in:
Dimi Lee
2019-02-28 08:12:36 +00:00
parent 982f6d8634
commit 15191963de
7 changed files with 133 additions and 136 deletions

View File

@@ -206,8 +206,8 @@ nsresult TableUpdateV4::NewRemovalIndices(const uint32_t* aIndices,
return NS_OK;
}
void TableUpdateV4::NewChecksum(const std::string& aChecksum) {
mChecksum.Assign(aChecksum.data(), aChecksum.size());
void TableUpdateV4::SetSHA256(const std::string& aSHA256) {
mSHA256.Assign(aSHA256.data(), aSHA256.size());
}
nsresult TableUpdateV4::NewFullHashResponse(