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.
파일 보기 프로젝트 열기: TheAngryByrd/MetroPass 1 사용 예제들

공개 메소드들

메소드 설명
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