All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.io.OutputStream
|
+----java.io.FilterOutputStream
|
+----is.hi.logir.cryptonite.EncryptStream
Beware that up to one byte less than a whole block of garbage may be appended to the data when flush is called, such as when the stream is closed.
out.
public EncryptStream(OutputStream out,
NoninterKeyExClient kex,
EncryptMode emode) throws ProtocolException, IOException
out. The emode object will be used
for encryption and if kex is not null
it will be used to inform the appropriate reader about what key
to use for decryption.
if kex is not null, then the key
returned by its sessionKey() method will be used in
the emode object. Otherwise, emode is
assumed to contain the proper key.
The data output can be read by a DecryptStream object which has
been initialized with the DecryptMode object which corresponds to
emode and the NoninteractiveKeyExchangeServer object
which corresponds kex, or null if
kex is null.
public synchronized void write(int b) throws IOException
public synchronized void write(byte buf[],
int off,
int len) throws IOException
public synchronized void flush() throws IOException
All Packages Class Hierarchy This Package Previous Next Index