summaryrefslogtreecommitdiffstats
path: root/base/rand_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/rand_util.h')
-rw-r--r--base/rand_util.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/base/rand_util.h b/base/rand_util.h
index c5c4ef8..4f4765b 100644
--- a/base/rand_util.h
+++ b/base/rand_util.h
@@ -32,14 +32,21 @@ BASE_EXPORT double RandDouble();
// the range [0, 1). Thread-safe.
BASE_EXPORT double BitsToOpenEndedUnitInterval(uint64 bits);
-// Fills |output_length| bytes of |output| with cryptographically strong random
-// data.
+// Fills |output_length| bytes of |output| with random data.
+//
+// WARNING:
+// Do not use for security-sensitive purposes.
+// See crypto/ for cryptographically secure random number generation APIs.
BASE_EXPORT void RandBytes(void* output, size_t output_length);
-// Fills a string of length |length| with with cryptographically strong random
-// data and returns it. |length| should be nonzero.
+// Fills a string of length |length| with with random data and returns it.
+// |length| should be nonzero.
//
// Note that this is a variation of |RandBytes| with a different return type.
+//
+// WARNING:
+// Do not use for security-sensitive purposes.
+// See crypto/ for cryptographically secure random number generation APIs.
BASE_EXPORT std::string RandBytesAsString(size_t length);
#ifdef OS_POSIX