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
Показать файл Открыть проект Примеры использования класса

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

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