Interface SecurityLock

  • All Known Subinterfaces:
    SecurityLockPasswordInterface, SecurityLockPKIInterface

    public interface SecurityLock
    Provides the functionality to (optionally) encrypt a PDFDocument at full save time.

    SecurityLock is composed of three attributes:

    • Security Manager for encryption
    • Encryption Parameters Map
    • Requested permissions

    Each of these attributes is represented by an object of an appropriate type. Different implementations of the SecurityLock instantiate these attributes according to the rules of specific implementations.

    Use SecurityKey.getSecurityManager() to decrypt the document.

    • Method Detail

      • getSecurityManager

        SecurityManager getSecurityManager()
        Return the Security Manager that contains Security Handlers used to encrypt a PDF document.

        a SecurityManager object. May return null.
      • setEncryptParameters

        void setEncryptParameters​(java.util.Map encryptParams)
        Set the encryption parameter map that reflects the content of the /Encrypt dictionary used to encrypt a PDF document.

        This Map uses the following correspondence between PDF Types and Java Objects:

        CosStringByte array
        encryptParams - the encryption parameters.
      • shouldEncrypt

        boolean shouldEncrypt()
        Determine whether the saved PDF document should be encrypted. The absence of encryption is one of the encryption choices. This method tells the user of the security lock implementation whether the saved PDF document should be encrypted.
        true if this document should be encrypted; false, otherwise.
      • getEncryptParameters

        java.util.Map getEncryptParameters()
        Get the encryption parameters map used for encryption.

        This Map uses the same correspondence between PDF Types and Java Objects as in the setEncryptParameters(Map) method.

        a Map that contains encryption parameters. May return null.