org.bouncycastle.crypto.engines

Class GOST28147Engine

public class GOST28147Engine extends Object implements BlockCipher

implementation of GOST 28147-89
Field Summary
protected static intBLOCK_SIZE
Constructor Summary
GOST28147Engine()
standard constructor.
Method Summary
StringgetAlgorithmName()
intgetBlockSize()
static byte[]getSBox(String sBoxName)
Return the S-Box associated with SBoxName
voidinit(boolean forEncryption, CipherParameters params)
initialise an GOST28147 cipher.
intprocessBlock(byte[] in, int inOff, byte[] out, int outOff)
voidreset()

Field Detail

BLOCK_SIZE

protected static final int BLOCK_SIZE

Constructor Detail

GOST28147Engine

public GOST28147Engine()
standard constructor.

Method Detail

getAlgorithmName

public String getAlgorithmName()

getBlockSize

public int getBlockSize()

getSBox

public static byte[] getSBox(String sBoxName)
Return the S-Box associated with SBoxName

Parameters: sBoxName name of the S-Box

Returns: byte array representing the S-Box

init

public void init(boolean forEncryption, CipherParameters params)
initialise an GOST28147 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()