password encryption (R2) bug

git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@144 1aa58f4a-7d42-0410-adbc-911cccaed67c
pull/1/head
yusuke.shinyama.dummy 2009-10-31 01:41:30 +00:00
parent b1e57bb8bb
commit 736a69a4cd
5 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
TODO TODO
Makefile Makefile
README.html README.txt
setup.py setup.py
pdfminer/Makefile pdfminer/Makefile
pdfminer/__init__.py pdfminer/__init__.py

View File

@ -36,6 +36,9 @@ check:
sdist: clean sdist: clean
$(PYTHON) setup.py sdist $(PYTHON) setup.py sdist
register: clean
$(PYTHON) setup.py sdist upload register
WEBDIR=$$HOME/Site/unixuser.org/python/$(PACKAGE) WEBDIR=$$HOME/Site/unixuser.org/python/$(PACKAGE)
publish: sdist publish: sdist
$(CP) dist/$(DISTFILE) $(WEBDIR) $(CP) dist/$(DISTFILE) $(WEBDIR)

1
TODO
View File

@ -1,4 +1,5 @@
TODOs: TODOs:
- sgml->xml
- PEP-8 conformance. - PEP-8 conformance.
- Better text extraction / layout analysis. - Better text extraction / layout analysis.
- Better API Documentation. - Better API Documentation.

View File

@ -14,11 +14,12 @@ Python PDF parser and analyzer
<p> <p>
<a href="http://www.unixuser.org/~euske/python/pdfminer/index.html">Homepage</a> <a href="http://www.unixuser.org/~euske/python/pdfminer/index.html">Homepage</a>
&nbsp;
<a href="#changes">Recent Changes</a> <a href="#changes">Recent Changes</a>
<div align=right class=lastmod> <div align=right class=lastmod>
<!-- hhmts start --> <!-- hhmts start -->
Last Modified: Sat Oct 24 13:40:19 JST 2009 Last Modified: Tue Oct 27 00:22:22 JST 2009
<!-- hhmts end --> <!-- hhmts end -->
</div> </div>
@ -64,8 +65,8 @@ PDF parser that can be used for other purposes instead of text analysis.
<a name="source"></a> <a name="source"></a>
<p> <p>
<strong>Download:</strong><br> <strong>Download:</strong><br>
<a href="http://www.unixuser.org/~euske/python/pdfminer/pdfminer-20091004.tar.gz"> <a href="http://www.unixuser.org/~euske/python/pdfminer/pdfminer-20091024.tar.gz">
http://www.unixuser.org/~euske/python/pdfminer/pdfminer-20091004.tar.gz http://www.unixuser.org/~euske/python/pdfminer/pdfminer-20091024.tar.gz
</a> </a>
(1.8Mbytes) (1.8Mbytes)

View File

@ -343,7 +343,7 @@ class PDFDocument(object):
key = hash.digest()[:length/8] key = hash.digest()[:length/8]
if R == 2: if R == 2:
# Algorithm 3.4 # Algorithm 3.4
u1 = Arcfour(key).process(password) u1 = Arcfour(key).process(self.PASSWORD_PADDING)
elif R == 3: elif R == 3:
# Algorithm 3.5 # Algorithm 3.5
hash = md5.md5(self.PASSWORD_PADDING) # 2 hash = md5.md5(self.PASSWORD_PADDING) # 2