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

Side by Side Diff: base/sha1.h

Issue 6729002: Base: A few more files using BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « base/rand_util.h ('k') | base/sha2.h » ('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) 2009 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/base_api.h"
12
11 namespace base { 13 namespace base {
12 14
13 // This function performs SHA-1 operations. 15 // This function performs SHA-1 operations.
14 16
15 enum { 17 enum {
16 SHA1_LENGTH = 20 // Length in bytes of a SHA-1 hash. 18 SHA1_LENGTH = 20 // Length in bytes of a SHA-1 hash.
17 }; 19 };
18 20
19 // Computes the SHA-1 hash of the input string |str| and returns the full 21 // Computes the SHA-1 hash of the input string |str| and returns the full
20 // hash. 22 // hash.
21 std::string SHA1HashString(const std::string& str); 23 BASE_API std::string SHA1HashString(const std::string& str);
22 24
23 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash 25 // Computes the SHA-1 hash of the |len| bytes in |data| and puts the hash
24 // in |hash|. |hash| must be SHA1_LENGTH bytes long. 26 // in |hash|. |hash| must be SHA1_LENGTH bytes long.
25 void SHA1HashBytes(const unsigned char* data, size_t len, 27 BASE_API void SHA1HashBytes(const unsigned char* data, size_t len,
26 unsigned char* hash); 28 unsigned char* hash);
27 29
28 } // namespace base 30 } // namespace base
29 31
30 #endif // BASE_SHA1_H_ 32 #endif // BASE_SHA1_H_
OLDNEW
« no previous file with comments | « base/rand_util.h ('k') | base/sha2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698