| 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 <stddef.h> |
| 8 #include <stdint.h> | 9 #include <stdint.h> |
| 9 | 10 |
| 10 #include "base/base_export.h" | 11 #include "base/base_export.h" |
| 11 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 | 15 |
| 15 // MD5 stands for Message Digest algorithm 5. | 16 // MD5 stands for Message Digest algorithm 5. |
| 16 // MD5 is a robust hash function, designed for cyptography, but often used | 17 // MD5 is a robust hash function, designed for cyptography, but often used |
| 17 // for file checksums. The code is complex and slow, but has few | 18 // for file checksums. The code is complex and slow, but has few |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Computes the MD5 sum of the given data buffer with the given length. | 69 // Computes the MD5 sum of the given data buffer with the given length. |
| 69 // The given 'digest' structure will be filled with the result data. | 70 // The given 'digest' structure will be filled with the result data. |
| 70 BASE_EXPORT void MD5Sum(const void* data, size_t length, MD5Digest* digest); | 71 BASE_EXPORT void MD5Sum(const void* data, size_t length, MD5Digest* digest); |
| 71 | 72 |
| 72 // Returns the MD5 (in hexadecimal) of a string. | 73 // Returns the MD5 (in hexadecimal) of a string. |
| 73 BASE_EXPORT std::string MD5String(const StringPiece& str); | 74 BASE_EXPORT std::string MD5String(const StringPiece& str); |
| 74 | 75 |
| 75 } // namespace base | 76 } // namespace base |
| 76 | 77 |
| 77 #endif // BASE_MD5_H_ | 78 #endif // BASE_MD5_H_ |
| OLD | NEW |