Class SecureRandom
Assembly: Lacuna.Pki.dll
Syntax
public class SecureRandom : Random
Constructors
SecureRandom()
Declaration
SecureRandom(RandomNumberGenerator)
Declaration
public SecureRandom(RandomNumberGenerator rng)
Parameters
Methods
Next()
Declaration
public override int Next()
Returns
Overrides
Next(Int32)
Declaration
public override int Next(int maxValue)
Parameters
Type |
Name |
Description |
Int32 |
maxValue |
|
Returns
Overrides
Next(Int32, Int32)
Declaration
public override int Next(int minValue, int maxValue)
Parameters
Type |
Name |
Description |
Int32 |
minValue |
|
Int32 |
maxValue |
|
Returns
Overrides
NextBytes(Byte[])
Declaration
public override void NextBytes(byte[] buffer)
Parameters
Type |
Name |
Description |
Byte[] |
buffer |
|
Overrides
NextDouble()
Declaration
public override double NextDouble()
Returns
Overrides
NextPassword(IEnumerable<Char>, Int32)
Given a set of characters and a length, generates a random password.
Declaration
public string NextPassword(IEnumerable<char> charset, int length)
Parameters
Type |
Name |
Description |
IEnumerable<Char> |
charset |
Set of characters to choose each character from
|
Int32 |
length |
Length of the password
|
Returns
Type |
Description |
String |
A random password of the given length with only the characters in the given set choosen randomly
|
Sample()
Declaration
protected override double Sample()
Returns
Overrides