public class GOST28147Engine extends Object implements BlockCipher
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BLOCK_SIZE |
| Constructor and Description |
|---|
GOST28147Engine()
standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithmName()
Return the name of the algorithm the cipher implements.
|
int |
getBlockSize()
Return the block size for this cipher (in bytes).
|
static byte[] |
getSBox(String sBoxName)
Return the S-Box associated with SBoxName
|
void |
init(boolean forEncryption,
CipherParameters params)
initialise an GOST28147 cipher.
|
int |
processBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
Process one block of input from the array in and write it to
the out array.
|
void |
reset()
Reset the cipher.
|
protected static final int BLOCK_SIZE
public void init(boolean forEncryption,
CipherParameters params)
init in interface BlockCipherforEncryption - whether or not we are for encryption.params - the parameters required to set up the cipher.IllegalArgumentException - if the params argument is
inappropriate.public String getAlgorithmName()
BlockCiphergetAlgorithmName in interface BlockCipherpublic int getBlockSize()
BlockCiphergetBlockSize in interface BlockCipherpublic int processBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
BlockCipherprocessBlock in interface BlockCipherin - the array containing the input data.inOff - offset into the in array the data starts at.out - the array the output data will be copied into.outOff - the offset into the out array the output will start at.public void reset()
BlockCipherreset in interface BlockCipherpublic static byte[] getSBox(String sBoxName)
sBoxName - name of the S-BoxCopyright © 2015. All rights reserved.