C# Class BraintreeEncryption.Library.BouncyCastle.Crypto.Prng.ReversedWindowGenerator

Takes bytes generated by an underling RandomGenerator and reverses the order in each small window (of configurable size).

Access to internals is synchronized so a single one of these can be shared.

Inheritance: IRandomGenerator
Show file Open project: braintree/braintree_windows_phone_encryption

Public Methods

Method Description
AddSeedMaterial ( byte seed ) : void

Add more seed material to the generator.

AddSeedMaterial ( long seed ) : void

Add more seed material to the generator.

NextBytes ( byte bytes ) : void

Fill byte array with random values.

NextBytes ( byte bytes, int start, int len ) : void

Fill byte array with random values.

ReversedWindowGenerator ( IRandomGenerator generator, int windowSize ) : System

Private Methods

Method Description
doNextBytes ( byte bytes, int start, int len ) : void

Method Details

AddSeedMaterial() public method

Add more seed material to the generator.
public AddSeedMaterial ( byte seed ) : void
seed byte A byte array to be mixed into the generator's state.
return void

AddSeedMaterial() public method

Add more seed material to the generator.
public AddSeedMaterial ( long seed ) : void
seed long A long value to be mixed into the generator's state.
return void

NextBytes() public method

Fill byte array with random values.
public NextBytes ( byte bytes ) : void
bytes byte Array to be filled.
return void

NextBytes() public method

Fill byte array with random values.
public NextBytes ( byte bytes, int start, int len ) : void
bytes byte Array to receive bytes.
start int Index to start filling at.
len int Length of segment to fill.
return void

ReversedWindowGenerator() public method

public ReversedWindowGenerator ( IRandomGenerator generator, int windowSize ) : System
generator IRandomGenerator
windowSize int
return System