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.