Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3290)

Unified Diff: blimp/common/blob_cache/id_util.h

Issue 1912153004: [blimp] Change to use SHA-256 instead of SHA-1 for unique ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from Wez Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/common/DEPS ('k') | blimp/common/blob_cache/id_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/common/blob_cache/id_util.h
diff --git a/blimp/common/blob_cache/id_util.h b/blimp/common/blob_cache/id_util.h
index 902d48a3bd4a4af85a5cae5d880fb3aeb6888d6f..f2724b8d0ff01d3035a7f70c7266ef5c7f0eda1f 100644
--- a/blimp/common/blob_cache/id_util.h
+++ b/blimp/common/blob_cache/id_util.h
@@ -13,14 +13,17 @@
namespace blimp {
-// Returns the bytes of a SHA1 hash of the input. The string is guaranteed
-// to have length base::kSHA1Length.
+// Returns a unique Id for the Blob, based on its content. All BlobIds have
+// the same length.
BLIMP_COMMON_EXPORT const BlobId CalculateBlobId(const void* data,
size_t data_size);
-// Returns a hexadecimal string representation of a SHA1 hash. The input is
-// required to have length base::kSHA1Length.
-BLIMP_COMMON_EXPORT const std::string FormatBlobId(const BlobId& data);
+// Returns a hexadecimal string representation of a BlobId. The input must
+// be a valid BlobId.
+BLIMP_COMMON_EXPORT const std::string BlobIdToString(const BlobId& id);
+
+// Returns whether the BlobId is valid.
+BLIMP_COMMON_EXPORT bool IsValidBlobId(const BlobId& id);
} // namespace blimp
« no previous file with comments | « blimp/common/DEPS ('k') | blimp/common/blob_cache/id_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698