Class Crypt4GHOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
no.uio.ifi.crypt4gh.stream.Crypt4GHOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class Crypt4GHOutputStream extends FilterOutputStream
Crypt4GHOutputStream that wraps existing OutputStream.
  • Constructor Details

    • Crypt4GHOutputStream

      public Crypt4GHOutputStream(OutputStream out, PrivateKey writerPrivateKey, PublicKey readerPublicKey) throws IOException, GeneralSecurityException
      Constructs the Crypt4GHOutputStream by wrapping existing OutputStream.
      Parameters:
      out - Existing OutputStream.
      writerPrivateKey - Sender's private key.
      readerPublicKey - Recipient's public key.
      Throws:
      IOException - In case the Crypt4GH header can't be read from the underlying OutputStream.
      GeneralSecurityException - In case the Crypt4GH header is malformed.
    • Crypt4GHOutputStream

      public Crypt4GHOutputStream(OutputStream out, no.uio.ifi.crypt4gh.pojo.header.DataEditList dataEditList, PrivateKey writerPrivateKey, PublicKey readerPublicKey) throws IOException, GeneralSecurityException
      Constructs the Crypt4GHOutputStream by wrapping existing OutputStream with DataEditList included to a header.
      Parameters:
      out - Existing OutputStream.
      dataEditList - Data Edit List.
      writerPrivateKey - Sender's private key.
      readerPublicKey - Recipient's public key.
      Throws:
      IOException - In case the Crypt4GH header can't be read from the underlying OutputStream.
      GeneralSecurityException - In case the Crypt4GH header is malformed.
  • Method Details