BlowfishJ
Class BlowfishOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--BlowfishJ.BlowfishOutputStream
- public class BlowfishOutputStream
- extends java.io.OutputStream
An OutputStream that encrypts data using the Blowfish algorithm
30 Mar 2002, fixed bug in flush method
- Author:
- Dale Anson (danson@germane-software.com), February, 2002
Method Summary |
void |
close()
This method calls flush(), so there is no need to call both. |
void |
flush()
Flushes this output stream and causes any buffered bytes to be written. |
void |
write(int b)
Writes the specified byte to this output stream. |
Methods inherited from class java.io.OutputStream |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlowfishOutputStream
public BlowfishOutputStream(java.lang.String passphrase,
java.io.OutputStream os)
- Parameters:
passphrase
- the password to use to encrypt the dataos
- the OutputStream to write the data to
write
public void write(int b)
throws java.io.IOException
- Writes the specified byte to this output stream. The general contract for write
is that one byte is written to the output stream. The byte to be written is
the eight low-order bits of the argument b. The 24 high-order bits of b are
ignored.
- Overrides:
write
in class java.io.OutputStream
- Parameters:
b
- the byte to write
close
public void close()
throws java.io.IOException
- This method calls flush(), so there is no need to call both.
- Overrides:
close
in class java.io.OutputStream
- See Also:
InputStream
flush
public void flush()
throws java.io.IOException
- Flushes this output stream and causes any buffered bytes to be written.
- Overrides:
flush
in class java.io.OutputStream