Class Encryption

    • Constructor Detail

      • Encryption

        public Encryption​(java.lang.String userPassword,
                          java.lang.String ownerPassword,
                          java.util.EnumSet<Permission> permissions)
        The getUserPassword() may be used to open the document with the permissions defined by the getPermissions() parameter. The getOwnerPassword() may be used to open the document with no access restrictions. The getPermissions() may be null (all permissions), or a concatenation of the allowed Permission values.
        Parameters:
        userPassword -
        ownerPassword -
        permissions -
        Throws:
        java.lang.IllegalArgumentException - if permissions is null
    • Method Detail

      • getUserPassword

        public java.lang.String getUserPassword()
        The user password opens the document with the permissions defined by the getPermissions() parameter.
      • setUserPassword

        public void setUserPassword​(java.lang.String value)
        The user password opens the document with the permissions defined by the getPermissions() parameter.
      • getOwnerPassword

        public java.lang.String getOwnerPassword()
        The owner password opens the document with no access restrictions.
      • setOwnerPassword

        public void setOwnerPassword​(java.lang.String value)
        The owner password opens the document with no access restrictions.
      • getPermissions

        public java.util.EnumSet<Permission> getPermissions()
        The permissions that will be granted to a user who opens the document using the getUserPassword(). The value is either null (all permissions), or a concatenation of the allowed Permission values.
      • setPermissions

        public void setPermissions​(java.util.EnumSet<Permission> value)
        The permissions that will be granted to a user who opens the document using the getUserPassword(). The value is either null (all permissions), or a concatenation of the allowed Permission values.
        Throws:
        java.lang.IllegalArgumentException - if value is null