public class Shacal2Engine extends java.lang.Object implements BlockCipher
A description of Shacal can be found at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.3.4066 Best known cryptanalytic (Wikipedia 11.2013): Related-key rectangle attack on 44-rounds (Jiqiang Lu, Jongsung Kim). Comments are related to SHA-256-Naming as described in FIPS PUB 180-2
| Constructor and Description | 
|---|
Shacal2Engine()  | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.String | 
getAlgorithmName()
Return the name of the algorithm the cipher implements. 
 | 
int | 
getBlockSize()
Return the block size for this cipher (in bytes). 
 | 
void | 
init(boolean _forEncryption,
    CipherParameters params)
Initialise the cipher. 
 | 
int | 
processBlock(byte[] in,
            int inOffset,
            byte[] out,
            int outOffset)
Process one block of input from the array in and write it to
 the out array. 
 | 
void | 
reset()
Reset the cipher. 
 | 
void | 
setKey(byte[] kb)  | 
public void reset()
BlockCipherreset in interface BlockCipherpublic java.lang.String getAlgorithmName()
BlockCiphergetAlgorithmName in interface BlockCipherpublic int getBlockSize()
BlockCiphergetBlockSize in interface BlockCipherpublic void init(boolean _forEncryption,
                 CipherParameters params)
          throws java.lang.IllegalArgumentException
BlockCipherinit in interface BlockCipher_forEncryption - if true the cipher is initialised for
  encryption, if false for decryption.params - the key and other data required by the cipher.java.lang.IllegalArgumentException - if the params argument is
 inappropriate.public void setKey(byte[] kb)
public int processBlock(byte[] in,
                        int inOffset,
                        byte[] out,
                        int outOffset)
                 throws DataLengthException,
                        java.lang.IllegalStateException
BlockCipherprocessBlock in interface BlockCipherin - the array containing the input data.inOffset - offset into the in array the data starts at.out - the array the output data will be copied into.outOffset - the offset into the out array the output will start at.DataLengthException - if there isn't enough data in in, or
 space in out.java.lang.IllegalStateException - if the cipher isn't initialised.