Package hudson.model
Class UsageStatistics.CombinedCipherOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- hudson.model.UsageStatistics.CombinedCipherOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- UsageStatistics
public static final class UsageStatistics.CombinedCipherOutputStream extends FilterOutputStream
Asymmetric cipher is slow and in case of Sun RSA implementation it can only encrypt the first block. So first create a symmetric key, then place this key in the beginning of the stream by encrypting it with the asymmetric 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
Constructors Constructor Description CombinedCipherOutputStream(OutputStream out, RSAKey key, String algorithm)
CombinedCipherOutputStream(OutputStream out, Cipher asym, String algorithm)
-
Method Summary
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
CombinedCipherOutputStream
public CombinedCipherOutputStream(OutputStream out, Cipher asym, String algorithm) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
CombinedCipherOutputStream
public CombinedCipherOutputStream(OutputStream out, RSAKey key, String algorithm) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
-