C# Класс KeePassLib.Cryptography.CryptoRandom

Cryptographically strong random number generator. The returned values are unpredictable and cannot be reproduced. CryptoRandom is a singleton class.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
CryptoRandom ( ) : System.Drawing
GenerateRandom256 ( ) : byte[]
GetCspData ( ) : byte[]
GetSystemData ( Random rWeak ) : byte[]

Описание методов

AddEntropy() публичный Метод

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.
Результат void

GetRandomBytes() публичный Метод

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.
Результат byte[]