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 | 7 |
| 8 #include <stddef.h> |
8 #include <stdint.h> | 9 #include <stdint.h> |
9 | 10 |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/base_export.h" | 13 #include "base/base_export.h" |
13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 | 17 |
17 // Returns a random number in range [0, UINT64_MAX]. Thread-safe. | 18 // Returns a random number in range [0, UINT64_MAX]. Thread-safe. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // See crypto/ for cryptographically secure random number generation APIs. | 53 // See crypto/ for cryptographically secure random number generation APIs. |
53 BASE_EXPORT std::string RandBytesAsString(size_t length); | 54 BASE_EXPORT std::string RandBytesAsString(size_t length); |
54 | 55 |
55 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
56 BASE_EXPORT int GetUrandomFD(); | 57 BASE_EXPORT int GetUrandomFD(); |
57 #endif | 58 #endif |
58 | 59 |
59 } // namespace base | 60 } // namespace base |
60 | 61 |
61 #endif // BASE_RAND_UTIL_H_ | 62 #endif // BASE_RAND_UTIL_H_ |
OLD | NEW |