Chromium Code Reviews| 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..cdfa4f6c2c611bbb8130a4ad23c70ad411c7c048 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 the bytes of a SHA-256 hash of the input. The string is guaranteed |
| +// to have length crypto::kSHA256Length. |
|
Wez
2016/04/23 00:08:52
The length of the string is only interesting in te
nyquist
2016/04/25 08:11:17
Agreed! Done.
|
| 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 SHA-256 hash. The input is |
|
Wez
2016/04/23 00:08:52
"... of a BlobId."
nyquist
2016/04/25 08:11:17
Done.
|
| +// required to have length crypto::kSHA256Length. |
| +BLIMP_COMMON_EXPORT const std::string FormatBlobId(const BlobId& id); |
|
Wez
2016/04/23 00:08:52
Suggest BlobIdToString rather than "format"; forma
nyquist
2016/04/25 08:11:17
Done.
|
| + |
| +// Returns whether the BlobId has the required length crypto::kSHA256Length. |
| +BLIMP_COMMON_EXPORT bool BlobIdHasCorrectLength(const BlobId& id); |
|
Wez
2016/04/23 00:08:52
Suggest naming this IsValidBlobId - then the Forma
nyquist
2016/04/25 08:11:17
Awesome suggestion! Done.
|
| } // namespace blimp |