hudson.model
Class UsageStatistics.CombinedCipherOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by hudson.model.UsageStatistics.CombinedCipherOutputStream
All Implemented Interfaces:
Closeable, Flushable
Enclosing class:
UsageStatistics

public static final class UsageStatistics.CombinedCipherOutputStream
extends FilterOutputStream

Assymetric cipher is slow and in case of Sun RSA implementation it can only encyrypt the first block. So first create a symmetric key, then place this key in the beginning of the stream by encrypting it with the assymetric cipher. The rest of the stream will be encrypted by a symmetric cipher.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
UsageStatistics.CombinedCipherOutputStream(OutputStream out, Cipher asym, String algorithm)
           
UsageStatistics.CombinedCipherOutputStream(OutputStream out, RSAKey key, String algorithm)
           
 
Method Summary
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsageStatistics.CombinedCipherOutputStream

public UsageStatistics.CombinedCipherOutputStream(OutputStream out,
                                                  Cipher asym,
                                                  String algorithm)
                                           throws IOException,
                                                  GeneralSecurityException
Throws:
IOException
GeneralSecurityException

UsageStatistics.CombinedCipherOutputStream

public UsageStatistics.CombinedCipherOutputStream(OutputStream out,
                                                  RSAKey key,
                                                  String algorithm)
                                           throws IOException,
                                                  GeneralSecurityException
Throws:
IOException
GeneralSecurityException


Copyright © 2004-2013. All Rights Reserved.