TrueZIP 6.8

de.schlichtherle.crypto.io.raes
Class RaesOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by de.schlichtherle.crypto.io.CipherOutputStream
              extended by de.schlichtherle.crypto.io.raes.RaesOutputStream
All Implemented Interfaces:
Closeable, Flushable

public abstract class RaesOutputStream
extends CipherOutputStream

An OutputStream to produce a file with data ecnrypted according to the Random Access Encryption Specification (RAES).

Since:
TrueZIP 6.0
Version:
$Id: RaesOutputStream.java,v 1.4 2010/08/20 13:09:38 christian_schlichtherle Exp $
Author:
Christian Schlichtherle
See Also:
RaesReadOnlyFile

Field Summary
 
Fields inherited from class de.schlichtherle.crypto.io.CipherOutputStream
cipher
 
Fields inherited from class java.io.FilterOutputStream
out
 
Method Summary
static RaesOutputStream getInstance(OutputStream out, RaesParameters parameters)
          Creates a new instance of RaesOutputStream.
abstract  int getKeySizeBits()
          Returns the key size in bits which is actually used to encrypt or decrypt the data for this output stream.
 
Methods inherited from class de.schlichtherle.crypto.io.CipherOutputStream
close, finish, write, write
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RaesOutputStream getInstance(OutputStream out,
                                           RaesParameters parameters)
                                    throws NullPointerException,
                                           IllegalArgumentException,
                                           RaesParametersException,
                                           IOException
Creates a new instance of RaesOutputStream.

Parameters:
out - The underlying output stream to use for the encrypted data.
parameters - The RaesParameters used to determine and configure the type of RAES file created. If the run time class of this parameter matches multiple parameter interfaces, it is at the discretion of this implementation which one is picked and hence which type of RAES file is created. If you need more control over this, pass in an instance which's run time class just implements the RaesParametersAgent interface. Instances of this interface are recursively used to find RAES parameters which match a known RAES type.
Throws:
NullPointerException - If FilterOutputStream.out is null or parameters is null.
IllegalArgumentException - If an illegal keyStrength is provided in the parameters.
RaesParametersException - If no suitable RAES parameters have been provided or something is wrong with the parameters.
IOException - On any other I/O related issue.

getKeySizeBits

public abstract int getKeySizeBits()
Returns the key size in bits which is actually used to encrypt or decrypt the data for this output stream.


TrueZIP 6.8

Copyright © 2005-2010 Schlichtherle IT Services. All Rights Reserved.