ch.ethz.ssh2.crypto.cipher
Class CipherOutputStream

java.lang.Object
  extended bych.ethz.ssh2.crypto.cipher.CipherOutputStream

public class CipherOutputStream
extends java.lang.Object

CipherOutputStream.

Version:
$Id: CipherOutputStream.java,v 1.4 2005/12/05 17:13:27 cplattne Exp $
Author:
Christian Plattner, plattner@inf.ethz.ch

Field Summary
(package private)  int blockSize
           
(package private)  java.io.OutputStream bo
           
(package private)  int BUFF_SIZE
           
(package private)  byte[] buffer
           
(package private)  BlockCipher currentCipher
           
(package private)  byte[] enc
           
(package private)  byte[] out_buffer
           
(package private)  int out_buffer_pos
           
(package private)  int pos
           
 
Constructor Summary
CipherOutputStream(BlockCipher tc, java.io.OutputStream bo)
           
 
Method Summary
 void changeCipher(BlockCipher bc)
           
 void flush()
           
private  void internal_write(byte[] src, int off, int len)
           
private  void internal_write(int b)
           
 void write(byte[] src, int off, int len)
           
 void write(int b)
           
private  void writeBlock()
           
 void writePlain(byte[] b, int off, int len)
           
 void writePlain(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentCipher

BlockCipher currentCipher

bo

java.io.OutputStream bo

buffer

byte[] buffer

enc

byte[] enc

blockSize

int blockSize

pos

int pos

BUFF_SIZE

final int BUFF_SIZE
See Also:
Constant Field Values

out_buffer

byte[] out_buffer

out_buffer_pos

int out_buffer_pos
Constructor Detail

CipherOutputStream

public CipherOutputStream(BlockCipher tc,
                          java.io.OutputStream bo)
Method Detail

internal_write

private void internal_write(byte[] src,
                            int off,
                            int len)
                     throws java.io.IOException
Throws:
java.io.IOException

internal_write

private void internal_write(int b)
                     throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

changeCipher

public void changeCipher(BlockCipher bc)

writeBlock

private void writeBlock()
                 throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] src,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

writePlain

public void writePlain(int b)
                throws java.io.IOException
Throws:
java.io.IOException

writePlain

public void writePlain(byte[] b,
                       int off,
                       int len)
                throws java.io.IOException
Throws:
java.io.IOException