org.bouncycastle.crypto.engines

Class RC4Engine

Implemented Interfaces:
StreamCipher

public class RC4Engine
extends java.lang.Object
implements StreamCipher

Method Summary

String
getAlgorithmName()
void
init(boolean forEncryption, CipherParameters params)
initialise a RC4 cipher.
void
processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
void
reset()
byte
returnByte(byte in)

Method Details

getAlgorithmName

public String getAlgorithmName()
Specified by:
getAlgorithmName in interface StreamCipher


init

public void init(boolean forEncryption,
                 CipherParameters params)
initialise a RC4 cipher.
Specified by:
init in interface StreamCipher

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


processBytes

public void processBytes(byte[] in,
                         int inOff,
                         int len,
                         byte[] out,
                         int outOff)
Specified by:
processBytes in interface StreamCipher


reset

public void reset()
Specified by:
reset in interface StreamCipher


returnByte

public byte returnByte(byte in)
Specified by:
returnByte in interface StreamCipher