org.bouncycastle.crypto.engines

Class RijndaelEngine

public class RijndaelEngine extends Object implements BlockCipher

an implementation of Rijndael, based on the documentation and reference implementation by Paulo Barreto, Vincent Rijmen, for v2.0 August '99.

Note: this implementation is based on information prior to final NIST publication.

Constructor Summary
RijndaelEngine()
default constructor - 128 bit block size.
RijndaelEngine(int blockBits)
basic constructor - set the cipher up for a given blocksize
Method Summary
StringgetAlgorithmName()
intgetBlockSize()
voidinit(boolean forEncryption, CipherParameters params)
initialise a Rijndael cipher.
intprocessBlock(byte[] in, int inOff, byte[] out, int outOff)
voidreset()

Constructor Detail

RijndaelEngine

public RijndaelEngine()
default constructor - 128 bit block size.

RijndaelEngine

public RijndaelEngine(int blockBits)
basic constructor - set the cipher up for a given blocksize

Parameters: blockBits the blocksize in bits, must be 128, 192, or 256.

Method Detail

getAlgorithmName

public String getAlgorithmName()

getBlockSize

public int getBlockSize()

init

public void init(boolean forEncryption, CipherParameters params)
initialise a Rijndael 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.

processBlock

public int processBlock(byte[] in, int inOff, byte[] out, int outOff)

reset

public void reset()