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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « crypto/crypto.gyp ('k') | crypto/random.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CRYPTO_RANDOM_H_ 5 #ifndef CRYPTO_RANDOM_H_
6 #define CRYPTO_RANDOM_H_ 6 #define CRYPTO_RANDOM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "crypto/crypto_export.h" 10 #include "base/rand_util.h"
11 11
12 namespace crypto { 12 namespace crypto {
13 13
14 // Fills the given buffer with |length| random bytes of cryptographically 14 // Fills the given buffer with |length| random bytes of cryptographically
15 // secure random numbers. 15 // secure random numbers.
16 // |length| must be positive. 16 // |length| must be positive.
17 CRYPTO_EXPORT void RandBytes(void *bytes, size_t length); 17 inline void RandBytes(void *bytes, size_t length) {
18 // It's OK to call base::RandBytes(), because it's already strongly random.
19 // But _other_ code should go through this function to ensure that code which
20 // needs secure randomness is easily discoverable.
21 base::RandBytes(bytes, length);
agl 2014/02/14 15:52:49 I think this makes the compile-time people sad bec
22 }
18 23
19 } 24 }
20 25
21 #endif 26 #endif
OLDNEW
« 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