1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
12 #include "base/base_export.h"
16 // These functions perform SHA-1 operations.
18 enum { kSHA1Length = 20 }; // Length in bytes of a SHA-1 hash.
20 // Computes the SHA-1 hash of the input string |str| and returns the full
22 BASE_EXPORT std::string SHA1HashString(const std::string& str);
24 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash
25 // in |hash|. |hash| must be kSHA1Length bytes long.
26 BASE_EXPORT void SHA1HashBytes(const unsigned char* data, size_t len,
31 #endif // BASE_SHA1_H_