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

Side by Side Diff: chrome/common/rand_util.h

Issue 4079: Porting refactoring changes:... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 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
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_RAND_UTIL_H__
6 #define CHROME_COMMON_RAND_UTIL_H__
7
8 #include "base/basictypes.h"
9
10 namespace rand_util {
11
12 // Returns a random number between min and max (inclusive). This is a
13 // non-cryptographic random number generator, using rand() from the CRT.
14 int RandInt(int min, int max);
15
16 // Returns a random number between min and max (inclusive). This is a (slower)
17 // cryptographic random number generator using rand_s() from the CRT. Note
18 // that it does not work in Win2K, so it degrades to RandInt.
19 int RandIntSecure(int min, int max);
20
21 } // namespace rand_util
22
23 #endif // CHROME_COMMON_RAND_UTIL_H__
24
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698