Class RydeEncoder

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@NotThreadSafe public final class RydeEncoder extends FilterOutputStream
Stream that performs the full RyDE encryption.

The RyDE format has 2 files:

  • the "data" file, encoded in data -> tar -> PgpFile -> compression -> encryption
  • the signature of the resulting file

Hence, the encoder needs to receive 2 OutputStreams - one for the data and one for the signature.

Because of the external tar file encoding - the encoder must know the total length of the data from the start. This is a bit annoying, but necessary.