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

Side by Side Diff: base/rand_util.h

Issue 12545059: ifdef OS_NAME -> if defined(OS_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 BASE_RAND_UTIL_H_ 5 #ifndef BASE_RAND_UTIL_H_
6 #define BASE_RAND_UTIL_H_ 6 #define BASE_RAND_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Fills a string of length |length| with with random data and returns it. 42 // Fills a string of length |length| with with random data and returns it.
43 // |length| should be nonzero. 43 // |length| should be nonzero.
44 // 44 //
45 // Note that this is a variation of |RandBytes| with a different return type. 45 // Note that this is a variation of |RandBytes| with a different return type.
46 // 46 //
47 // WARNING: 47 // WARNING:
48 // Do not use for security-sensitive purposes. 48 // Do not use for security-sensitive purposes.
49 // See crypto/ for cryptographically secure random number generation APIs. 49 // See crypto/ for cryptographically secure random number generation APIs.
50 BASE_EXPORT std::string RandBytesAsString(size_t length); 50 BASE_EXPORT std::string RandBytesAsString(size_t length);
51 51
52 #ifdef OS_POSIX 52 #if defined(OS_POSIX)
53 BASE_EXPORT int GetUrandomFD(); 53 BASE_EXPORT int GetUrandomFD();
54 #endif 54 #endif
55 55
56 } // namespace base 56 } // namespace base
57 57
58 #endif // BASE_RAND_UTIL_H_ 58 #endif // BASE_RAND_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698