ccs.crypt
Class BCCHOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by ccs.crypt.CipherOutputStream
              extended by ccs.crypt.AbstractBlockCipherOutputStream
                  extended by ccs.crypt.BCCHOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class BCCHOutputStream
extends AbstractBlockCipherOutputStream


Field Summary
 
Fields inherited from class ccs.crypt.CipherOutputStream
plainlen, temp8
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
protected BCCHOutputStream(DammedOutputStream dos, long plainlen, BCCHBlockCipher cipher)
           
 
Method Summary
protected  void writeHeader(java.io.OutputStream q)
          Write the first part of the "header", not including any required stream length information.
 
Methods inherited from class ccs.crypt.AbstractBlockCipherOutputStream
finish, write
 
Methods inherited from class ccs.crypt.CipherOutputStream
close, flush, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BCCHOutputStream

protected BCCHOutputStream(DammedOutputStream dos,
                           long plainlen,
                           BCCHBlockCipher cipher)
Method Detail

writeHeader

protected void writeHeader(java.io.OutputStream q)
                    throws java.io.IOException
Description copied from class: AbstractBlockCipherOutputStream
Write the first part of the "header", not including any required stream length information. For CBC ciphers, this is usually just the IV. NB. You should wash the header through your MAC. The CCSBlockCipher's buffer is available as scratch space.

Specified by:
writeHeader in class AbstractBlockCipherOutputStream
Parameters:
q - The stream to write to.
Throws:
java.io.IOException