C# Class KeePassLib.Cryptography.CryptoRandom

Cryptographically strong random number generator. The returned values are unpredictable and cannot be reproduced. CryptoRandom is a singleton class.
Afficher le fichier Open project: cappert/keepass2 Class Usage Examples

Méthodes publiques

Méthode Description
AddEntropy ( byte pbEntropy ) : void

Update the internal seed of the random number generator based on entropy data. This method is thread-safe.

GetRandomBytes ( uint uRequestedBytes ) : byte[]

Get a number of cryptographically strong random bytes. This method is thread-safe.

Private Methods

Méthode Description
CryptoRandom ( ) : System.Drawing
GenerateRandom256 ( ) : byte[]
GetCspData ( ) : byte[]
GetSystemData ( Random rWeak ) : byte[]

Method Details

AddEntropy() public méthode

Update the internal seed of the random number generator based on entropy data. This method is thread-safe.
public AddEntropy ( byte pbEntropy ) : void
pbEntropy byte Entropy bytes.
Résultat void

GetRandomBytes() public méthode

Get a number of cryptographically strong random bytes. This method is thread-safe.
public GetRandomBytes ( uint uRequestedBytes ) : byte[]
uRequestedBytes uint Number of requested random bytes.
Résultat byte[]