net.sourceforge.blowfishj
Class BlowfishInputStream
java.lang.Object
java.io.InputStream
net.sourceforge.blowfishj.BlowfishInputStream
- public class BlowfishInputStream
- extends java.io.InputStream
An input stream that reads from a file created an instance of the
net.sourceforge.blowfishj.BlowfishOutputStream class.
- Author:
- original version by Dale Anson
Constructor Summary |
BlowfishInputStream(byte[] key,
int nOfs,
int nLen,
java.io.InputStream is)
Default constructor. |
BlowfishInputStream(java.lang.String sPassPhrase,
java.io.InputStream is)
Deprecated. due to the restrictions in usage and the discarding of some
original key material it is highly recommended not to use it anymore |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlowfishInputStream
public BlowfishInputStream(byte[] key,
int nOfs,
int nLen,
java.io.InputStream is)
throws java.io.IOException
- Default constructor. The key material gets transformed to a final 160bit
key using SHA-1.
- Parameters:
key
- key buffernOfs
- where the key material startsnLen
- size of the key material (in bytes)is
- the input stream from which bytes will be read
- Throws:
java.io.IOException
- if the IV couldn't be read out
BlowfishInputStream
public BlowfishInputStream(java.lang.String sPassPhrase,
java.io.InputStream is)
throws java.io.IOException
- Deprecated. due to the restrictions in usage and the discarding of some
original key material it is highly recommended not to use it anymore
- Constructor using a string. The ASCII character values of the string are
hashed with SHA-1, the digest is used as the final key.
- Parameters:
sPassPhrase
- the passphraseis
- the input stream from which bytes will be read
- Throws:
java.io.IOException
- if the IV couldn't be read out
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.read()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
InputStream.close()
Copyright © 2004-2005 Sourceforge. All Rights Reserved.