Chromium Code Reviews| Index: crypto/random.h |
| diff --git a/crypto/random.h b/crypto/random.h |
| index 002616bd30ef7818f34fcf33d2750c824af44f80..868ba409560be5bc480aa7389e32c4f397f47f8a 100644 |
| --- a/crypto/random.h |
| +++ b/crypto/random.h |
| @@ -7,14 +7,19 @@ |
| #include <stddef.h> |
| -#include "crypto/crypto_export.h" |
| +#include "base/rand_util.h" |
| namespace crypto { |
| // Fills the given buffer with |length| random bytes of cryptographically |
| // secure random numbers. |
| // |length| must be positive. |
| -CRYPTO_EXPORT void RandBytes(void *bytes, size_t length); |
| +inline void RandBytes(void *bytes, size_t length) { |
| + // It's OK to call base::RandBytes(), because it's already strongly random. |
| + // But _other_ code should go through this function to ensure that code which |
| + // needs secure randomness is easily discoverable. |
| + base::RandBytes(bytes, length); |
|
agl
2014/02/14 15:52:49
I think this makes the compile-time people sad bec
|
| +} |
| } |