C# Class Org.BouncyCastle.Crypto.Engines.Salsa20Engine

Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
Inheritance: IStreamCipher
Mostrar archivo Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Public Methods

Method Description
Init ( bool forEncryption, ICipherParameters parameters ) : void
ProcessBytes ( byte inBytes, int inOff, int len, byte outBytes, int outOff ) : void
Reset ( ) : void
ReturnByte ( byte input ) : byte

Private Methods

Method Description
byteToIntLittle ( byte x, int offset ) : int
intToByteLittle ( int x, byte bs, int off ) : byte[]
limitExceeded ( ) : bool
limitExceeded ( int len ) : bool
resetCounter ( ) : void
rotl ( int x, int y ) : int
salsa20WordToByte ( int input, byte output ) : void
setKey ( byte keyBytes, byte ivBytes ) : void

Method Details

Init() public method

public Init ( bool forEncryption, ICipherParameters parameters ) : void
forEncryption bool
parameters ICipherParameters
return void

ProcessBytes() public method

public ProcessBytes ( byte inBytes, int inOff, int len, byte outBytes, int outOff ) : void
inBytes byte
inOff int
len int
outBytes byte
outOff int
return void

Reset() public method

public Reset ( ) : void
return void

ReturnByte() public method

public ReturnByte ( byte input ) : byte
input byte
return byte