org.bouncycastle.crypto.engines

Class Salsa20Engine

public class Salsa20Engine extends Object implements StreamCipher

Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
Method Summary
StringgetAlgorithmName()
voidinit(boolean forEncryption, CipherParameters params)
initialise a Salsa20 cipher.
voidprocessBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
voidreset()
bytereturnByte(byte in)

Method Detail

getAlgorithmName

public String getAlgorithmName()

init

public void init(boolean forEncryption, CipherParameters params)
initialise a Salsa20 cipher.

Parameters: forEncryption whether or not we are for encryption. params the parameters required to set up the cipher.

Throws: IllegalArgumentException if the params argument is inappropriate.

processBytes

public void processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)

reset

public void reset()

returnByte

public byte returnByte(byte in)