diff options
Diffstat (limited to 'chromium/base/hash/sha1.h')
-rw-r--r-- | chromium/base/hash/sha1.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/base/hash/sha1.h b/chromium/base/hash/sha1.h index 525137eab3b..dc0d59f153e 100644 --- a/chromium/base/hash/sha1.h +++ b/chromium/base/hash/sha1.h @@ -7,9 +7,11 @@ #include <stddef.h> +#include <array> #include <string> #include "base/base_export.h" +#include "base/containers/span.h" namespace base { @@ -17,6 +19,10 @@ namespace base { enum { kSHA1Length = 20 }; // Length in bytes of a SHA-1 hash. +// Computes the SHA-1 hash of the input |data| and returns the full hash. +BASE_EXPORT std::array<uint8_t, kSHA1Length> SHA1HashSpan( + span<const uint8_t> data); + // Computes the SHA-1 hash of the input string |str| and returns the full // hash. BASE_EXPORT std::string SHA1HashString(const std::string& str); |