Chromium Code Reviews| Index: base/rand_util.h |
| diff --git a/base/rand_util.h b/base/rand_util.h |
| index 82e548b82923d45d0c805be920981528e0c60887..39e2f104c43cc61c64eb0ef397ba67d559feef71 100644 |
| --- a/base/rand_util.h |
| +++ b/base/rand_util.h |
| @@ -13,20 +13,23 @@ |
| namespace base { |
| -// Returns a random number in range [0, kuint64max]. Thread-safe. |
| +// The random number generator functions below generate |
| +// cryptographically secure random numbers. They are thread-safe. |
| + |
| +// Random integer in range [0, kuint64max]. |
| BASE_EXPORT uint64 RandUint64(); |
| -// Returns a random number between min and max (inclusive). Thread-safe. |
| +// Random integer in range [min, max). |
| BASE_EXPORT int RandInt(int min, int max); |
| -// Returns a random number in range [0, range). Thread-safe. |
| +// Random integer in range [0, range). |
| // |
| // Note that this can be used as an adapter for std::random_shuffle(): |
| // Given a pre-populated |std::vector<int> myvector|, shuffle it as |
| // std::random_shuffle(myvector.begin(), myvector.end(), base::RandGenerator); |
| BASE_EXPORT uint64 RandGenerator(uint64 range); |
| -// Returns a random double in range [0, 1). Thread-safe. |
|
Ryan Sleevi
2012/06/04 17:46:30
I feel like these comments were correct as origina
|
| +// Random double in range [0, 1). |
| BASE_EXPORT double RandDouble(); |
| // Given input |bits|, convert with maximum precision to a double in |