C# Класс CryptoRandom, WingTipTickets

Наследование: RandomNumberGenerator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

CryptoRandom() публичный Метод

Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.
public CryptoRandom ( ) : System
Результат System

GetBytes() публичный Метод

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.
Результат void

Next() публичный Метод

Returns a nonnegative random number.
public Next ( ) : int
Результат int

Next() публичный Метод

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
Результат int

Next() публичный Метод

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.
Результат int

NextDouble() публичный Метод

Returns a random number between 0.0 and 1.0.
public NextDouble ( ) : double
Результат double