C# 클래스 RandomOps.RandomDotOrg

Random Number Generator (RNG) that downloads random bytes from the internet website: www.random.org. Not thread-safe. These random bytes are generated from atmospheric noise picked up by radios. Only a certain number of bits are allowed to be downloaded from this website to your IP address each day, so this RNG is used with a Fallback-PRNG.
상속: ByteStream
파일 보기 프로젝트 열기: DanWBR/dwsim3 1 사용 예제들

공개 메소드들

메소드 설명
RandomDotOrg ( int bufferSize, Random randFallback, int numFallback ) : System.Collections.Generic

Constructs the RNG-object.

RetrieveBytes ( int length ) : List

Do the actual retrieval of random bytes from the www.random.org website.

보호된 메소드들

메소드 설명
DoFillBuffer ( int length ) : void

Called from ByteStream to request the retrieval of random bytes.

메소드 상세

DoFillBuffer() 보호된 최종 메소드

Called from ByteStream to request the retrieval of random bytes.
protected final DoFillBuffer ( int length ) : void
length int The number of bytes requested.
리턴 void

RandomDotOrg() 공개 메소드

Constructs the RNG-object.
public RandomDotOrg ( int bufferSize, Random randFallback, int numFallback ) : System.Collections.Generic
bufferSize int Number of random bytes the buffer holds.
randFallback Random Fallback RNG to be used when buffer is empty.
numFallback int Use fallback RNG for this many bytes before trying to fill buffer again.
리턴 System.Collections.Generic

RetrieveBytes() 공개 정적인 메소드

Do the actual retrieval of random bytes from the www.random.org website.
/// Thrown if daily download quota is depleted, /// the HTTP response code is 503 for 'Server Unavailable'. ///
public static RetrieveBytes ( int length ) : List
length int Number of bytes to retrieve (max 10000).
리턴 List