C# Class Org.BouncyCastle.Security.SecureRandom

Inheritance: System.Random
Exibir arquivo Open project: nonorganic/dssnet Class Usage Examples

Protected Properties

Property Type Description
generator IRandomGenerator

Private Properties

Property Type Description

Public Methods

Method Description
GenerateSeed ( int length ) : byte[]
GetInstance ( string algorithm ) : SecureRandom
GetSeed ( int length ) : byte[]
Next ( ) : int
Next ( int maxValue ) : int
Next ( int minValue, int maxValue ) : int
NextBytes ( byte buffer ) : void
NextBytes ( byte buffer, int start, int length ) : void
NextDouble ( ) : double
NextInt ( ) : int
NextLong ( ) : long
SecureRandom ( ) : System
SecureRandom ( IRandomGenerator generator ) : System

Use the specified instance of IRandomGenerator as random source.

This constructor performs no seeding of either the IRandomGenerator or the constructed SecureRandom. It is the responsibility of the client to provide proper seed material as necessary/appropriate for the given IRandomGenerator implementation.

SecureRandom ( byte inSeed ) : System
SetSeed ( byte inSeed ) : void
SetSeed ( long seed ) : void

Method Details

GenerateSeed() public method

public GenerateSeed ( int length ) : byte[]
length int
return byte[]

GetInstance() public static method

public static GetInstance ( string algorithm ) : SecureRandom
algorithm string
return SecureRandom

GetSeed() public static method

public static GetSeed ( int length ) : byte[]
length int
return byte[]

Next() public method

public Next ( ) : int
return int

Next() public method

public Next ( int maxValue ) : int
maxValue int
return int

Next() public method

public Next ( int minValue, int maxValue ) : int
minValue int
maxValue int
return int

NextBytes() public method

public NextBytes ( byte buffer ) : void
buffer byte
return void

NextBytes() public method

public NextBytes ( byte buffer, int start, int length ) : void
buffer byte
start int
length int
return void

NextDouble() public method

public NextDouble ( ) : double
return double

NextInt() public method

public NextInt ( ) : int
return int

NextLong() public method

public NextLong ( ) : long
return long

SecureRandom() public method

public SecureRandom ( ) : System
return System

SecureRandom() public method

Use the specified instance of IRandomGenerator as random source.
This constructor performs no seeding of either the IRandomGenerator or the constructed SecureRandom. It is the responsibility of the client to provide proper seed material as necessary/appropriate for the given IRandomGenerator implementation.
public SecureRandom ( IRandomGenerator generator ) : System
generator IRandomGenerator The source to generate all random bytes from.
return System

SecureRandom() public method

public SecureRandom ( byte inSeed ) : System
inSeed byte
return System

SetSeed() public method

public SetSeed ( byte inSeed ) : void
inSeed byte
return void

SetSeed() public method

public SetSeed ( long seed ) : void
seed long
return void

Property Details

generator protected_oe property

protected IRandomGenerator generator
return IRandomGenerator