Class CryptoRandom
Secure random number generator.
Inheritance
System.Object
System.Random
CryptoRandom
Inherited Members
System.Random.Sample()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QuikGraph.Utils
Assembly: QuikGraph.dll
Syntax
public class CryptoRandom : Random
Remarks
Note that because of security issue the seed is unused in this random number generator. Note also that it is slower than classic System.Random but on purpose.
Constructors
| Improve this Doc View SourceCryptoRandom()
Initializes a new instance of the CryptoRandom class.
Declaration
public CryptoRandom()
CryptoRandom(Int32)
Initializes a new instance of the CryptoRandom class.
Declaration
public CryptoRandom(int ignoredSeed)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ignoredSeed | Seed is ignored, just to keep same API as System.Random. |
Methods
| Improve this Doc View SourceNext()
Declaration
public override int Next()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Random.Next()
|
Improve this Doc
View Source
Next(Int32)
Declaration
public override int Next(int maxValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxValue |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Random.Next(System.Int32)
|
Improve this Doc
View Source
Next(Int32, Int32)
Declaration
public override int Next(int minValue, int maxValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | minValue | |
System.Int32 | maxValue |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Random.Next(System.Int32, System.Int32)
|
Improve this Doc
View Source
NextBytes(Byte[])
Declaration
public override void NextBytes(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer |
Overrides
System.Random.NextBytes(System.Byte[])
|
Improve this Doc
View Source
NextDouble()
Declaration
public override double NextDouble()
Returns
Type | Description |
---|---|
System.Double |
Overrides
System.Random.NextDouble()