Show / Hide Table of Contents

Class SecureRandom

Inheritance
Object
Random
SecureRandom
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public class SecureRandom : Random

Constructors

SecureRandom()

Declaration
public SecureRandom()

SecureRandom(RandomNumberGenerator)

Declaration
public SecureRandom(RandomNumberGenerator rng)
Parameters
Type Name Description
RandomNumberGenerator rng

Methods

Next()

Declaration
public override int Next()
Returns
Type Description
Int32
Overrides
Random.Next()

Next(Int32)

Declaration
public override int Next(int maxValue)
Parameters
Type Name Description
Int32 maxValue
Returns
Type Description
Int32
Overrides
Random.Next(Int32)

Next(Int32, Int32)

Declaration
public override int Next(int minValue, int maxValue)
Parameters
Type Name Description
Int32 minValue
Int32 maxValue
Returns
Type Description
Int32
Overrides
Random.Next(Int32, Int32)

NextBytes(Byte[])

Declaration
public override void NextBytes(byte[] buffer)
Parameters
Type Name Description
Byte[] buffer
Overrides
Random.NextBytes(Byte[])

NextDouble()

Declaration
public override double NextDouble()
Returns
Type Description
Double
Overrides
Random.NextDouble()

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
Type Description
Double
Overrides
Random.Sample()
Back to top Copyright © 2015-2020 Lacuna Software