@ThreadSafe public class CryptInputStream extends FilterInputStream
Crypt.
This is simply an extension to the standard CipherInputStream, which
reads the initialization vector in the constructor. So both constructors may throw an IOException, if failing
to read the initialization vector.
Please ensure that close is always called explicitly for this stream object. Failing to do so will result in
missing plain text bytes.in| Constructor and Description |
|---|
CryptInputStream(Crypt crypt,
InputStream input,
byte[] passwordBytes)
An input stream for the specified
Crypt. |
CryptInputStream(Crypt crypt,
InputStream input,
CharSequence password)
An input stream for the specified
Crypt. |
public CryptInputStream(@Nonnull Crypt crypt, @Nonnull InputStream input, @Nonnull CharSequence password) throws IOException
Crypt.
This is simply an extension to the standard CipherInputStream, which
reads the initialization vector in the constructor. So this constructor may throw an IOException, if failing
to read the initialization vector.
Please ensure that close is always called explicitly for this stream object. Failing to do so will result in
missing plain text bytes.crypt - the used Crypt objectinput - the cipher input streampassword - the passwordIOException - IOException if failing to read the initialization vectorCryptoInitializationProblem - in case of a CryptoInitializationProblem problempublic CryptInputStream(@Nonnull Crypt crypt, @Nonnull InputStream input, @Nonnull byte[] passwordBytes) throws IOException
Crypt.
This is simply an extension to the standard CipherInputStream, which
reads the initialization vector in the constructor. So this constructor may throw an IOException, if failing
to read the initialization vector.
Please ensure that close is always called explicitly for this stream object. Failing to do so will result in
missing plain text bytes.crypt - the used Crypt objectinput - the cipher input streampasswordBytes - the password bytesIOException - IOException if failing to read the initialization vectorCryptoInitializationProblem - in case of a CryptoInitializationProblem problemCopyright © 2014 Michael Bock. All rights reserved.