com.mindbright.security.cipher
Class CAST128

java.lang.Object
  extended by com.mindbright.jce.crypto.CipherSpi
      extended by com.mindbright.security.cipher.BlockCipher
          extended by com.mindbright.security.cipher.CAST128

public final class CAST128
extends BlockCipher


Field Summary
protected  int[] Km
           
protected  int[] Kr
           
 
Constructor Summary
CAST128()
           
 
Method Summary
 void blockDecrypt(byte[] in, int inOffset, byte[] out, int outOffset)
           
 void blockEncrypt(byte[] in, int inOffset, byte[] out, int outOffset)
           
 int getBlockSize()
           
 void initializeKey(byte[] key)
           
protected static void putIntMSBOSpec(int val, int[] dest, int destOffset)
           
 
Methods inherited from class com.mindbright.security.cipher.BlockCipher
engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineInit, engineInit, engineSetMode, engineSetPadding, getIntLSBO, getIntMSBO, nboIncr, putIntLSBO, putIntMSBO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Km

protected int[] Km

Kr

protected int[] Kr
Constructor Detail

CAST128

public CAST128()
Method Detail

getBlockSize

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

putIntMSBOSpec

protected static final void putIntMSBOSpec(int val,
                                           int[] dest,
                                           int destOffset)

initializeKey

public void initializeKey(byte[] key)
                   throws InvalidKeyException
Specified by:
initializeKey in class BlockCipher
Throws:
InvalidKeyException

blockEncrypt

public void blockEncrypt(byte[] in,
                         int inOffset,
                         byte[] out,
                         int outOffset)
Specified by:
blockEncrypt in class BlockCipher

blockDecrypt

public void blockDecrypt(byte[] in,
                         int inOffset,
                         byte[] out,
                         int outOffset)
Specified by:
blockDecrypt in class BlockCipher