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

Nick Burch commented on TIKA-850:
---------------------------------

Based on this, I think the best option may be to have a new interface, called 
something like PasswordProvider, set onto the ParseContext

PasswordProvider would have a single method, 'String getPassword(Metadata)', 
which would potentially allow you to look up the password based on the resource 
name and content type. 

We'd probably want a single implementation out of the box, which takes a String 
on the constructor and always returns that as the password, to make life easy 
for calling parsing when you know the password for your file

Thoughts? Better names? Alternate ways to do it?
                
> Consistent way to supply document passwords to parsers
> ------------------------------------------------------
>
>                 Key: TIKA-850
>                 URL: https://issues.apache.org/jira/browse/TIKA-850
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>    Affects Versions: 1.0
>            Reporter: Nick Burch
>
> Currently, PDF document passwords are supplied to the parser via a special 
> key on the Metadata object, while the Office Parser has a TODO and only 
> supports the default password
> We should update all the parsers that support encrypted documents (currently 
> PDF, Office OLE2 and Office OOXML) to receive the password in a consistent way

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to