Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: base/sha1.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/sequenced_task_runner_helpers.h ('k') | base/sha1_portable.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_SHA1_H_ 5 #ifndef BASE_SHA1_H_
6 #define BASE_SHA1_H_ 6 #define BASE_SHA1_H_
7 7
8 #include <stddef.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/base_export.h" 12 #include "base/base_export.h"
11 13
12 namespace base { 14 namespace base {
13 15
14 // These functions perform SHA-1 operations. 16 // These functions perform SHA-1 operations.
15 17
16 static const size_t kSHA1Length = 20; // Length in bytes of a SHA-1 hash. 18 static const size_t kSHA1Length = 20; // Length in bytes of a SHA-1 hash.
17 19
18 // Computes the SHA-1 hash of the input string |str| and returns the full 20 // Computes the SHA-1 hash of the input string |str| and returns the full
19 // hash. 21 // hash.
20 BASE_EXPORT std::string SHA1HashString(const std::string& str); 22 BASE_EXPORT std::string SHA1HashString(const std::string& str);
21 23
22 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash 24 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash
23 // in |hash|. |hash| must be kSHA1Length bytes long. 25 // in |hash|. |hash| must be kSHA1Length bytes long.
24 BASE_EXPORT void SHA1HashBytes(const unsigned char* data, size_t len, 26 BASE_EXPORT void SHA1HashBytes(const unsigned char* data, size_t len,
25 unsigned char* hash); 27 unsigned char* hash);
26 28
27 } // namespace base 29 } // namespace base
28 30
29 #endif // BASE_SHA1_H_ 31 #endif // BASE_SHA1_H_
OLDNEW
« no previous file with comments | « base/sequenced_task_runner_helpers.h ('k') | base/sha1_portable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698