Save This Page
Home » crypto-143 » org.bouncycastle.crypto » [javadoc | source]
org.bouncycastle.crypto
public class: StreamBlockCipher [javadoc | source]
java.lang.Object
   org.bouncycastle.crypto.StreamBlockCipher

All Implemented Interfaces:
    StreamCipher

a wrapper for block ciphers with a single byte block size, so that they can be treated like stream ciphers.
Constructor:
 public StreamBlockCipher(BlockCipher cipher) 
    basic constructor.
    Parameters:
    cipher - the block cipher to be wrapped.
    Throws:
    IllegalArgumentException - if the cipher has a block size other than one.
    exception: IllegalArgumentException - if the cipher has a block size other than one.
Method from org.bouncycastle.crypto.StreamBlockCipher Summary:
getAlgorithmName,   init,   processBytes,   reset,   returnByte
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.bouncycastle.crypto.StreamBlockCipher Detail:
 public String getAlgorithmName() 
    return the name of the algorithm we are wrapping.
 public  void init(boolean forEncryption,
    CipherParameters params) 
    initialise the underlying cipher.
 public  void processBytes(byte[] in,
    int inOff,
    int len,
    byte[] out,
    int outOff) throws DataLengthException 
    process a block of bytes from in putting the result into out.
 public  void reset() 
    reset the underlying cipher. This leaves it in the same state it was at after the last init (if there was one).
 public byte returnByte(byte in) 
    encrypt/decrypt a single byte returning the result.