| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IOS_DEVICE_UTIL_H_ | 5 #ifndef BASE_IOS_DEVICE_UTIL_H_ |
| 6 #define BASE_IOS_DEVICE_UTIL_H_ | 6 #define BASE_IOS_DEVICE_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace ios { | 10 namespace ios { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Returns a random UUID. | 65 // Returns a random UUID. |
| 66 std::string GetRandomId(); | 66 std::string GetRandomId(); |
| 67 | 67 |
| 68 // Returns an identifier for the device, using the given |salt|. A global | 68 // Returns an identifier for the device, using the given |salt|. A global |
| 69 // identifier is generated the first time this method is called, and the salt | 69 // identifier is generated the first time this method is called, and the salt |
| 70 // is used to be able to generate distinct identifiers for the same device. If | 70 // is used to be able to generate distinct identifiers for the same device. If |
| 71 // |salt| is NULL, a default value is used. Unless you are using this value for | 71 // |salt| is NULL, a default value is used. Unless you are using this value for |
| 72 // something that should be anonymous, you should probably pass NULL. | 72 // something that should be anonymous, you should probably pass NULL. |
| 73 std::string GetDeviceIdentifier(const char* salt); | 73 std::string GetDeviceIdentifier(const char* salt); |
| 74 | 74 |
| 75 // Returns a hashed version of |in_string| using |salt| (which must not |
| 76 // zero-length). Different salt values should result in differently hashed |
| 77 // strings. |
| 78 std::string GetSaltedString(const std::string& in_string, |
| 79 const std::string& salt); |
| 80 |
| 75 } // namespace device_util | 81 } // namespace device_util |
| 76 } // namespace ios | 82 } // namespace ios |
| 77 | 83 |
| 78 #endif // BASE_IOS_DEVICE_UTIL_H_ | 84 #endif // BASE_IOS_DEVICE_UTIL_H_ |
| OLD | NEW |