| Index: base/sha2.cc
|
| diff --git a/base/sha2.cc b/base/sha2.cc
|
| index b6d6d5659c258684198d4ac1995d7d1f265dd9c4..47d381b18cf94bb3dd463455d1c6c413f1ad0152 100644
|
| --- a/base/sha2.cc
|
| +++ b/base/sha2.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "base/sha2.h"
|
|
|
| +#include "base/stl_util-inl.h"
|
| #include "base/third_party/nss/blapi.h"
|
| #include "base/third_party/nss/sha256.h"
|
|
|
| @@ -19,4 +20,10 @@ void SHA256HashString(const std::string& str, void* output, size_t len) {
|
| static_cast<unsigned int>(len));
|
| }
|
|
|
| +std::string SHA256HashString(const std::string& str) {
|
| + std::string output(SHA256_LENGTH, 0);
|
| + SHA256HashString(str, string_as_array(&output), str.size());
|
| + return output;
|
| +}
|
| +
|
| } // namespace base
|
|
|