[This is preliminary documentation and is subject to change.]
The ExternalRandomGenerator type exposes the following members.Constructors
Name | Description | |
---|---|---|
![]() | ExternalRandomGenerator |
Create new instance of ExternalRandomGenerator. Create new instances only if you need to use different sample ring buffers.
In majority of cases use ExternalRandomGenerator.Instance to use default instance instead of creating a new instance.
Default instance is thread-safe for process-wide use
|
Methods
Name | Description | |
---|---|---|
![]() | ![]() | Determines whether the specified object is equal to the current object. (Inherited from ![]() |
![]() | FeedExternalEntropySample |
Introduces external entropy into the generation sequence by adding a sample into the ring buffer.
Call this 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...
|
![]() | ![]() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from ![]() |
![]() | ![]() | Serves as the default hash function. (Inherited from ![]() |
![]() | ![]() | Gets the (Inherited from ![]() ![]() |
![]() | ![]() | Creates a shallow copy of the current (Inherited from ![]() ![]() |
![]() | NextRandomBytes(Int32) |
Generates a random buffer of bytes
|
![]() | NextRandomBytes(Int32, Int32) |
Generates a random buffer of bytes
|
![]() | NextRandomSecureBuffer(Int32) |
Generates a random secure buffer of bytes
|
![]() | NextRandomSecureBuffer(Int32, Int32) |
Generates a random secure buffer of bytes
|
![]() | NextRandomWebSafeSecureBuffer |
Generates a random secure buffer of chars which are safe for the use on the web -
a string that only contains "a-z"/"A-Z" and "0-9" and "-"/"_" chars, i.e.: "bo7O0EFasZe-wEty9w0__JiOKk81".
The length of the string can not be less than 4 and more than 1024 chars
|
![]() | NextRandomWebSafeString |
Generates a random string of chars which are safe for the use on the web -
a string that only contains "a-z"/"A-Z" and "0-9" and "-"/"_" chars, i.e.: "bo7O0EFasZe-wEty9w0__JiOKk81".
The length of the string can not be less than 4 and more than 1024 chars
|
![]() | NextScaledRandomDouble |
Generates random double number in min..max range
|
![]() | NextScaledRandomInteger |
Generates random number in min..max range
|
![]() | ![]() | Returns a string that represents the current object. (Inherited from ![]() |
Extension Methods
Properties
Name | Description | |
---|---|---|
![]() ![]() | Instance |
Returns the default instance of the generator. This instance is thread-safe
|
![]() | NextRandom16Bytes |
Generates random byte[16] buffer
|
![]() | NextRandomDouble |
Returns 0..1 random double
|
![]() | NextRandomInteger |
Generates next random integer in the Int32.MinValue..Int32.MaxValue diapason
|
![]() | NextRandomUnsignedInteger |
Generates next random integer in the Uint32.MinValue..Uint32.MaxValue diapason
|
![]() | NextRandomUnsignedLong |
Generates next random ulong in the Uint64.MinValue..Uint64.MaxValue range
|
See Also