Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: crypto/random.h

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: meant to remove crypto/random.cc Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/crypto.gyp ('k') | crypto/random.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+}
}
« no previous file with comments | « crypto/crypto.gyp ('k') | crypto/random.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698