[This is preliminary documentation and is subject to change.]
Represents a random generator which is based on System.Random() yet has an ability to feed external samples into it.
Use ExtrenalRandomGenerator.Instance to use the default thread-safe instance.
System Object NFX ExternalRandomGeneratorNamespace: NFXAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
public sealed class ExternalRandomGenerator
public sealed class ExternalRandomGenerator
Public NotInheritable Class ExternalRandomGenerator
Public NotInheritable Class ExternalRandomGenerator
public ref class ExternalRandomGenerator sealed
public ref class ExternalRandomGenerator sealed
[<SealedAttribute>]
type ExternalRandomGenerator = class end
[<SealedAttribute>]
type ExternalRandomGenerator = class end
Introduces external entropy into the generation sequence by adding a sample into the ring buffer.
Call FeedExternalEntropySample(int sample) method from places that have true entropy values, i.e.
a network-related code may have good entropy sources in server applications.
External entropy sources may rely on user-dependent actions, i.e.:
number of bytes/requests received per second, dollar(or cent remainders) amount of purchases made (on a server),
zip codes of customers, IP addresses of site visitors, average noise level sampled on an open WAVE device(microphone),
mouse position (i.e. in GUI app) etc...
This class MAY be crypto-safe if it is fed a good entropy data at high rate, however that depends on the use pattern.
The framework implementation feeds some entropy from Glue and cache components infrequently (once every few seconds),
which is definitely not strong for cryptography