ch.ethz.ssh2.crypto.cipher
Class CipherInputStream

java.lang.Object
  extended by ch.ethz.ssh2.crypto.cipher.CipherInputStream

public class CipherInputStream
extends java.lang.Object

CipherInputStream.

Version:
2.50, 03/15/10
Author:
Christian Plattner

Field Summary
(package private)  java.io.InputStream bi
           
(package private)  int blockSize
           
(package private)  int BUFF_SIZE
           
(package private)  byte[] buffer
           
(package private)  BlockCipher currentCipher
           
(package private)  byte[] enc
           
(package private)  byte[] input_buffer
           
(package private)  int input_buffer_pos
           
(package private)  int input_buffer_size
           
(package private)  int pos
           
 
Constructor Summary
CipherInputStream(BlockCipher tc, java.io.InputStream bi)
           
 
Method Summary
 void changeCipher(BlockCipher bc)
           
private  int fill_buffer()
           
private  void getBlock()
           
private  int internal_read(byte[] b, int off, int len)
           
 int read()
           
 int read(byte[] dst)
           
 int read(byte[] dst, int off, int len)
           
 int readPlain(byte[] b, int off, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentCipher

BlockCipher currentCipher

bi

java.io.InputStream bi

buffer

byte[] buffer

enc

byte[] enc

blockSize

int blockSize

pos

int pos

BUFF_SIZE

final int BUFF_SIZE
See Also:
Constant Field Values

input_buffer

byte[] input_buffer

input_buffer_pos

int input_buffer_pos

input_buffer_size

int input_buffer_size
Constructor Detail

CipherInputStream

public CipherInputStream(BlockCipher tc,
                         java.io.InputStream bi)
Method Detail

fill_buffer

private int fill_buffer()
                 throws java.io.IOException
Throws:
java.io.IOException

internal_read

private int internal_read(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
Throws:
java.io.IOException

changeCipher

public void changeCipher(BlockCipher bc)

getBlock

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

read

public int read(byte[] dst)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] dst,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

readPlain

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