|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.logi.crypto.io.DecryptStream
Decrypt a stream of data encrypted with a corresponding EncryptStream ojbect.
EncryptStream
,
DecryptMode
Field Summary |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
DecryptStream(java.io.InputStream in,
NoninterKeyExServer kex,
DecryptMode dmode)
Create a new DecryptStream. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
void |
close()
Closes this input stream and releases any system resources associated with this stream. |
int |
drain()
Drain random bytes inserted to fill a plain-text block. |
void |
execute(NoninterProtocolServer prot)
Executes a non-interactive protocol through the encrypted channel. |
boolean |
markSupported()
Returns false. |
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of bytes. |
long |
skip(long n)
Does nothing and returns 0. |
Methods inherited from class java.io.FilterInputStream |
mark, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DecryptStream(java.io.InputStream in, NoninterKeyExServer kex, DecryptMode dmode) throws CryptoProtocolException, java.io.IOException
out
,
dmode
is used for decryption and if kex
is not null it will be used to generate the session key or receive i
from the client. See the various key-exchange server classes for
details.
Note that if kex
is not null, it controls which
session key is used and dmode
receives the session key
when it has been decided. If kex
is null, then
dmode
must be initialized with a key, and the same symmetric
key or matching asymmetric key must be used on the client.
CryptoProtocolException
- if a problem arises with the key-exchange protocol.
java.io.IOException
- if problems arise with the underlying OutputStream.Method Detail |
public void execute(NoninterProtocolServer prot) throws java.io.IOException, CryptoProtocolException
CryptoProtocolException
- if there is a problem with the protocol.
java.io.IOException
- if there is a problem with the underlying streams.public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
java.io.IOException
public long skip(long n) throws java.io.IOException
java.io.IOException
public int drain()
flush()
was called at this point in creating the
stream, drain()
will remove the random bytes.
EncryptStream.flush()
public void close() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public boolean markSupported()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |