Save This Page
Home » geronimo-2.2-source-release » org.apache.geronimo.crypto.crypto.modes » [javadoc | source]
org.apache.geronimo.crypto.crypto.modes
public class: CBCBlockCipher [javadoc | source]
java.lang.Object
   org.apache.geronimo.crypto.crypto.modes.CBCBlockCipher

All Implemented Interfaces:
    BlockCipher

implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
Constructor:
 public CBCBlockCipher(BlockCipher cipher) 
    Basic constructor.
    Parameters:
    cipher - the block cipher to be used as the basis of chaining.
Method from org.apache.geronimo.crypto.crypto.modes.CBCBlockCipher Summary:
getAlgorithmName,   getBlockSize,   getUnderlyingCipher,   init,   processBlock,   reset
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.crypto.crypto.modes.CBCBlockCipher Detail:
 public String getAlgorithmName() 
    return the algorithm name and mode.
 public int getBlockSize() 
    return the block size of the underlying cipher.
 public BlockCipher getUnderlyingCipher() 
    return the underlying block cipher that we are wrapping.
 public  void init(boolean encrypting,
    CipherParameters params) throws IllegalArgumentException 
    Initialise the cipher and, possibly, the initialisation vector (IV). If an IV isn't passed as part of the parameter, the IV will be all zeros.
 public int processBlock(byte[] in,
    int inOff,
    byte[] out,
    int outOff) throws DataLengthException, IllegalStateException 
    Process one block of input from the array in and write it to the out array.
 public  void reset() 
    reset the chaining vector back to the IV and reset the underlying cipher.