Class PublicKeySecurityHandler

    • Field Detail

    • Constructor Detail

      • PublicKeySecurityHandler

        public PublicKeySecurityHandler()
        Constructor.
      • PublicKeySecurityHandler

        public PublicKeySecurityHandler​(PublicKeyProtectionPolicy publicKeyProtectionPolicy)
        Constructor used for encryption.
        Parameters:
        publicKeyProtectionPolicy - The protection policy.
    • Method Detail

      • prepareForDecryption

        public void prepareForDecryption​(PDEncryption encryption,
                                         byte[] documentIDBytes,
                                         DecryptionMaterial decryptionMaterial)
                                  throws java.io.IOException
        Prepares everything to decrypt the document.
        Specified by:
        prepareForDecryption in class SecurityHandler<PublicKeyProtectionPolicy>
        Parameters:
        encryption - encryption dictionary
        documentIDBytes - document id bytes (not used by this handler)
        decryptionMaterial - Information used to decrypt the document.
        Throws:
        java.io.IOException - If there is an error accessing data. If verbose mode is enabled, the exception message will provide more details why the match wasn't successful.
      • prepareDocumentForEncryption

        public void prepareDocumentForEncryption​(PDEncryption dictionary,
                                                 byte[] documentID)
                                          throws java.io.IOException
        Prepare the document for encryption.
        Specified by:
        prepareDocumentForEncryption in class SecurityHandler<PublicKeyProtectionPolicy>
        Parameters:
        dictionary - encryption dictionary
        documentID - document ID bytes
        Throws:
        java.io.IOException - If there is an error while encrypting.