C# Class CryptoRandom, WingTipTickets

Inheritance: RandomNumberGenerator
Datei anzeigen Open project: Microsoft/WingTipTickets Class Usage Examples

Public Methods

Method Description
CryptoRandom ( ) : System

Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.

GetBytes ( byte buffer ) : void

Fills the elements of a specified array of bytes with random numbers.

Next ( ) : int

Returns a nonnegative random number.

Next ( int maxValue ) : int

Returns a nonnegative random number less than the specified maximum

Next ( int minValue, int maxValue ) : int

Returns a random number within the specified range.

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

Method Details

CryptoRandom() public method

Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.
public CryptoRandom ( ) : System
return System

GetBytes() public method

Fills the elements of a specified array of bytes with random numbers.
public GetBytes ( byte buffer ) : void
buffer byte An array of bytes to contain random numbers.
return void

Next() public method

Returns a nonnegative random number.
public Next ( ) : int
return int

Next() public method

Returns a nonnegative random number less than the specified maximum
public Next ( int maxValue ) : int
maxValue int The inclusive upper bound of the random number returned. maxValue must be greater than or equal 0
return int

Next() public method

Returns a random number within the specified range.
public Next ( int minValue, int maxValue ) : int
minValue int The inclusive lower bound of the random number returned.
maxValue int The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.
return int

NextDouble() public method

Returns a random number between 0.0 and 1.0.
public NextDouble ( ) : double
return double