C# Класс Metropass.Core.PCL.Cipher.CryptoRandomStream

A random stream class. The class is initialized using random bytes provided by the caller. The produced stream has random properties, but for the same seed always the same stream is produced, i.e. this class can be used as stream cipher.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CryptoRandomStream ( CrsAlgorithm genAlgorithm, byte pbKey, ICanSHA256Hash hasher ) : System

Construct a new cryptographically secure random stream object.

GetRandomBytes ( uint uRequestedCount ) : byte[]

Get uRequestedCount random bytes.

GetRandomUInt64 ( ) : ulong

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

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

Construct a new cryptographically secure random stream object.
Thrown if the /// parameter is null. Thrown if the /// parameter contains no bytes or the /// algorithm is unknown.
public CryptoRandomStream ( CrsAlgorithm genAlgorithm, byte pbKey, ICanSHA256Hash hasher ) : System
genAlgorithm CrsAlgorithm Algorithm to use.
pbKey byte Initialization key. Must not be null and /// must contain at least 1 byte.
hasher ICanSHA256Hash
Результат System

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

Get uRequestedCount random bytes.
public GetRandomBytes ( uint uRequestedCount ) : byte[]
uRequestedCount uint Number of random bytes to retrieve.
Результат byte[]

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

public GetRandomUInt64 ( ) : ulong
Результат ulong