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