OLD | NEW |
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_MD5_H_ | 5 #ifndef BASE_MD5_H_ |
6 #define BASE_MD5_H_ | 6 #define BASE_MD5_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 | 12 |
13 // MD5 stands for Message Digest algorithm 5. | 13 // MD5 stands for Message Digest algorithm 5. |
14 // MD5 is a robust hash function, designed for cyptography, but often used | 14 // MD5 is a robust hash function, designed for cyptography, but often used |
15 // for file checksums. The code is complex and slow, but has few | 15 // for file checksums. The code is complex and slow, but has few |
16 // collisions. | 16 // collisions. |
17 // See Also: | 17 // See Also: |
18 // http://en.wikipedia.org/wiki/MD5 | 18 // http://en.wikipedia.org/wiki/MD5 |
19 | 19 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Converts a digest into human-readable hexadecimal. | 61 // Converts a digest into human-readable hexadecimal. |
62 BASE_EXPORT std::string MD5DigestToBase16(const MD5Digest& digest); | 62 BASE_EXPORT std::string MD5DigestToBase16(const MD5Digest& digest); |
63 | 63 |
64 // Returns the MD5 (in hexadecimal) of a string. | 64 // Returns the MD5 (in hexadecimal) of a string. |
65 BASE_EXPORT std::string MD5String(const StringPiece& str); | 65 BASE_EXPORT std::string MD5String(const StringPiece& str); |
66 | 66 |
67 } // namespace base | 67 } // namespace base |
68 | 68 |
69 #endif // BASE_MD5_H_ | 69 #endif // BASE_MD5_H_ |
OLD | NEW |