Skip to content

Decrypt PDF with Just The User Password #835

Closed Answered by mkl-public
viveksuraiya asked this question in Q&A
Discussion options

You must be logged in to vote

Either password should do.

If you have a PDF you have both passwords for and OpenPDF can only read it with the owner password, please share the PDF for analysis.

(One aside, though: pw.getBytes() is not necessarily the correct way to get the bytes of a password. If your document uses AES256 (R=6) encryption, the specification requires "The UTF-8 password string shall be generated from Unicode input by processing the input string with the SASLprep (Internet RFC 4013) profile of stringprep (Internet RFC 3454) using the Normalize and BiDi options, and then converting to a UTF-8 representation." In complex cases this may result in something different than your pw.getBytes().)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@asturio
Comment options

Answer selected by asturio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants