1 // Copyright (c) 2009 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. 4 5 #ifndef BASE_SHA1_H_ 6 #define BASE_SHA1_H_ 7 8 #include <string> 9 10 namespace base { 11 12 // This function performs SHA-1 operations. 13 14 enum { 15 SHA1_LENGTH = 20 // Length in bytes of a SHA-1 hash. 16 }; 17 18 // Computes the SHA-1 hash of the input string |str| and returns the full 19 // hash. 20 std::string SHA1HashString(const std::string& str); 21 22 } // namespace base 23 24 #endif // BASE_SHA1_H_ 25