C# 클래스 Thinktecture.IdentityModel.CryptoRandom

A class that mimics the standard Random class in the .NET Framework - but uses RNGCryptoServiceProvider internally.
상속: System.Random
파일 보기 프로젝트 열기: IdentityModel/Thinktecture.IdentityModel.v1 1 사용 예제들

공개 메소드들

메소드 설명
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