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

Side by Side Diff: base/rand_util.h

Issue 10446043: Cleanup: Remove the C version of GetUrandomFD() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright Created 8 years, 6 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 | « base/base.gypi ('k') | base/rand_util_c.h » ('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) 2011 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 BASE_RAND_UTIL_H_ 5 #ifndef BASE_RAND_UTIL_H_
6 #define BASE_RAND_UTIL_H_ 6 #define BASE_RAND_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/base_export.h" 11 #include "base/base_export.h"
(...skipping 24 matching lines...) Expand all
36 // Fills |output_length| bytes of |output| with cryptographically strong random 36 // Fills |output_length| bytes of |output| with cryptographically strong random
37 // data. 37 // data.
38 BASE_EXPORT void RandBytes(void* output, size_t output_length); 38 BASE_EXPORT void RandBytes(void* output, size_t output_length);
39 39
40 // Fills a string of length |length| with with cryptographically strong random 40 // Fills a string of length |length| with with cryptographically strong random
41 // data and returns it. |length| should be nonzero. 41 // data and returns it. |length| should be nonzero.
42 // 42 //
43 // Note that this is a variation of |RandBytes| with a different return type. 43 // Note that this is a variation of |RandBytes| with a different return type.
44 BASE_EXPORT std::string RandBytesAsString(size_t length); 44 BASE_EXPORT std::string RandBytesAsString(size_t length);
45 45
46 #ifdef OS_POSIX
47 BASE_EXPORT int GetUrandomFD();
48 #endif
49
46 } // namespace base 50 } // namespace base
47 51
48 #endif // BASE_RAND_UTIL_H_ 52 #endif // BASE_RAND_UTIL_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/rand_util_c.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698