diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 21:17:20 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 21:17:20 +0000 |
commit | 5035f683b6fbf8cc945a96af9598a4739a8c6f4f (patch) | |
tree | 8e0034b65759f5bcbba3de1ad8e5f368635c4743 /base/sha1.h | |
parent | dfbb6ff293dc14f646c17a42981b4645a4172e20 (diff) | |
download | chromium_src-5035f683b6fbf8cc945a96af9598a4739a8c6f4f.zip chromium_src-5035f683b6fbf8cc945a96af9598a4739a8c6f4f.tar.gz chromium_src-5035f683b6fbf8cc945a96af9598a4739a8c6f4f.tar.bz2 |
Add base::SHA1HashBytes.
We need this for LevelDB.
BUG=64078
TEST=base_unittest --gtest_filter=SHA1Test
Review URL: http://codereview.chromium.org/6661025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sha1.h')
-rw-r--r-- | base/sha1.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/sha1.h b/base/sha1.h index dd43686..80540c1 100644 --- a/base/sha1.h +++ b/base/sha1.h @@ -20,6 +20,11 @@ enum { // hash. std::string SHA1HashString(const std::string& str); +// Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash +// in |hash|. |hash| must be SHA1_LENGTH bytes long. +void SHA1HashBytes(const unsigned char* data, size_t len, + unsigned char* hash); + } // namespace base #endif // BASE_SHA1_H_ |