You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/10/28 18:55:34 UTC

[jira] [Commented] (PDFBOX-1986) Move SecurityHandler to PDEncryptionDictionary

    [ https://issues.apache.org/jira/browse/PDFBOX-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14187181#comment-14187181 ] 

Tilman Hausherr commented on PDFBOX-1986:
-----------------------------------------

I wonder if this code in PDEncryption.java is correct:

{code}
public boolean hasSecurityHandler()
{
    return securityHandler == null;
}
{code}


> Move SecurityHandler to PDEncryptionDictionary
> ----------------------------------------------
>
>                 Key: PDFBOX-1986
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1986
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>              Labels: Encryption
>             Fix For: 2.0.0
>
>
> In the PDF specification a "security handler" is defined in the "encryption dictionary", but in PDFBox the security handler belongs to the document itself.
> It is not difficult to move the SecurityHandler field of PDDocument to the PDEncryptionDictionary class, and we can do so without introducing any breaking changes.
> We can deprecate methods at this point rather than removing them, until we're happy with feedback.
> Also, we generally don't use the postfix "Dictionary" because most classes in the PD model represent dictionaries anyway, so we should rename PDEncryptionDictionary to PDEncryption. Luckily we can just deprecate the old class and add a new subclass with the desired name. This avoids breaking changes until we're happy with the new state of things.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)