Class BcAEADUtil.PGPAeadInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    BcAEADUtil

    protected static class BcAEADUtil.PGPAeadInputStream
    extends java.io.InputStream
    • Constructor Summary

      Constructors 
      Constructor Description
      PGPAeadInputStream​(boolean isV5StyleAEAD, java.io.InputStream in, org.bouncycastle.crypto.modes.AEADBlockCipher c, org.bouncycastle.crypto.params.KeyParameter secretKey, byte[] iv, int encAlgorithm, int aeadAlgorithm, int chunkSize, byte[] aaData)
      InputStream for decrypting AEAD encrypted data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      int read()  
      int read​(byte[] b, int off, int len)  
      long skip​(long n)  
      • Methods inherited from class java.io.InputStream

        close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PGPAeadInputStream

        public PGPAeadInputStream​(boolean isV5StyleAEAD,
                                  java.io.InputStream in,
                                  org.bouncycastle.crypto.modes.AEADBlockCipher c,
                                  org.bouncycastle.crypto.params.KeyParameter secretKey,
                                  byte[] iv,
                                  int encAlgorithm,
                                  int aeadAlgorithm,
                                  int chunkSize,
                                  byte[] aaData)
                           throws java.io.IOException
        InputStream for decrypting AEAD encrypted data.
        Parameters:
        isV5StyleAEAD - flavour of AEAD (OpenPGP v5 or v6)
        in - underlying InputStream
        c - decryption cipher
        secretKey - decryption key
        iv - initialization vector
        encAlgorithm - symmetric cipher algorithm
        aeadAlgorithm - AEAD algorithm
        chunkSize - chunk size of the AEAD encryption
        aaData - associated data
        Throws:
        java.io.IOException
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.InputStream
        Throws:
        java.io.IOException
      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.InputStream
        Throws:
        java.io.IOException