C# Класс Thinktecture.IdentityModel.CryptoRandom

A class that mimics the standard Random class in the .NET Framework - but uses RNGCryptoServiceProvider internally.
Наследование: System.Random
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CryptoRandom ( ) : System

Initializes a new instance of the CryptoRandom class.

CryptoRandom ( Int32 ignoredSeed ) : System

Initializes a new instance of the CryptoRandom class.

Next ( ) : Int32

Returns a nonnegative random number.

Next ( Int32 maxValue ) : Int32

Returns a nonnegative random number less than the specified maximum.

Next ( Int32 minValue, Int32 maxValue ) : Int32

Returns a random number within a specified range.

NextBytes ( byte buffer ) : void

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

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

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

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

Initializes a new instance of the CryptoRandom class.
public CryptoRandom ( ) : System
Результат System

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

Initializes a new instance of the CryptoRandom class.
public CryptoRandom ( Int32 ignoredSeed ) : System
ignoredSeed System.Int32 seed (ignored)
Результат System

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

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

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

Returns a nonnegative random number less than the specified maximum.
/// is less than zero. ///
public Next ( Int32 maxValue ) : Int32
maxValue System.Int32 The exclusive upper bound of the random number to be generated. must be greater than or equal to zero.
Результат System.Int32

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

Returns a random number within a specified range.
/// is greater than . ///
public Next ( Int32 minValue, Int32 maxValue ) : Int32
minValue System.Int32 The inclusive lower bound of the random number returned.
maxValue System.Int32 The exclusive upper bound of the random number returned. must be greater than or equal to .
Результат System.Int32

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

Fills the elements of a specified array of bytes with random numbers.
/// is null. ///
public NextBytes ( byte buffer ) : void
buffer byte An array of bytes to contain random numbers.
Результат void

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

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