Interface EncryptionHandler


  • public interface EncryptionHandler
    Implements specific encryption and decryption algorithms.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      EncryptionHandlerState createEncryptionHandlerState()  
      byte[] decrypt​(byte[] src, byte[] addKey)
      Decrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
      void decrypt​(InputByteStream src, OutputByteStream dest, byte[] addKey)
      Decrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
      byte[] encrypt​(byte[] src, byte[] addKey)
      Encrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
      void encrypt​(InputByteStream src, OutputByteStream dest, byte[] addKey)
      Encrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
    • Method Detail

      • encrypt

        byte[] encrypt​(byte[] src,
                       byte[] addKey)
                throws PDFSecurityConfigurationException
        Encrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.

        The encryption algorithm depends on a particular implementation of this class.

        Parameters:
        src - the input byte array.
        addKey - the addition to the encryption key.
        Returns:
        encrypted byte array.
        Throws:
        PDFSecurityConfigurationException
      • decrypt

        byte[] decrypt​(byte[] src,
                       byte[] addKey)
                throws PDFSecurityConfigurationException
        Decrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.

        The encryption algorithm depends on a particular implementation of this class.

        Parameters:
        src - the input byte array.
        addKey - the addition to the encryption key.
        Returns:
        decrypted byte array.
        Throws:
        PDFSecurityConfigurationException