| 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_RAND_UTIL_H_ | 5 #ifndef BASE_RAND_UTIL_H_ |
| 6 #define BASE_RAND_UTIL_H_ | 6 #define BASE_RAND_UTIL_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include <string> | 8 #include <string> |
| 10 | 9 |
| 11 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| 12 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 13 | 12 |
| 14 namespace base { | 13 namespace base { |
| 15 | 14 |
| 16 // Returns a random number in range [0, kuint64max]. Thread-safe. | 15 // Returns a random number in range [0, kuint64max]. Thread-safe. |
| 17 BASE_EXPORT uint64 RandUint64(); | 16 BASE_EXPORT uint64 RandUint64(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 // Note that this is a variation of |RandBytes| with a different return type. | 42 // Note that this is a variation of |RandBytes| with a different return type. |
| 44 BASE_EXPORT std::string RandBytesAsString(size_t length); | 43 BASE_EXPORT std::string RandBytesAsString(size_t length); |
| 45 | 44 |
| 46 #ifdef OS_POSIX | 45 #ifdef OS_POSIX |
| 47 BASE_EXPORT int GetUrandomFD(); | 46 BASE_EXPORT int GetUrandomFD(); |
| 48 #endif | 47 #endif |
| 49 | 48 |
| 50 } // namespace base | 49 } // namespace base |
| 51 | 50 |
| 52 #endif // BASE_RAND_UTIL_H_ | 51 #endif // BASE_RAND_UTIL_H_ |
| OLD | NEW |