SecureRandom
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class
public class SecureRandom : Random
Hierarquia: object → Random → SecureRandom
Construtores
SecureRandom()
public SecureRandom()
SecureRandom(RandomNumberGenerator)
public SecureRandom(RandomNumberGenerator rng)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
rng | RandomNumberGenerator |
Métodos
Next()
public override int Next()
Retorno
Next(int, int)
public override int Next(int minValue, int maxValue)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
minValue | int | |
maxValue | int |
Retorno
Next(int)
public override int Next(int maxValue)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
maxValue | int |
Retorno
NextBytes(byte[])
public override void NextBytes(byte[] buffer)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
buffer | byte[] |
NextDouble()
public override double NextDouble()
Retorno
NextPassword(IEnumerable<char>, int)
Given a set of characters and a length, generates a random password.
public string NextPassword(IEnumerable<char> charset, int length)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
charset | IEnumerable<char> | Set of characters to choose each character from |
length | int | Length of the password |
Retorno
string — A random password of the given length with only the characters in the given set choosen randomly
Sample()
protected override double Sample()
Retorno
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()