org.bouncycastle.crypto.engines

Class RijndaelEngine

Implemented Interfaces:
BlockCipher

public class RijndaelEngine
extends java.lang.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

String
getAlgorithmName()
int
getBlockSize()
void
init(boolean forEncryption, CipherParameters params)
initialise a Rijndael cipher.
int
processBlock(byte[] in, int inOff, byte[] out, int outOff)
void
reset()

Constructor Details

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 Details

getAlgorithmName

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

getBlockSize

public int getBlockSize()
Specified by:
getBlockSize in interface BlockCipher

init

public void init(boolean forEncryption,
                 CipherParameters params)
initialise a Rijndael cipher.
Specified by:
init in interface BlockCipher
Parameters:
forEncryption - whether or not we are for encryption.
params - the parameters required to set up the cipher.

processBlock

public int processBlock(byte[] in,
                        int inOff,
                        byte[] out,
                        int outOff)
Specified by:
processBlock in interface BlockCipher

reset

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