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
Makefile
README.html
README.txt
setup.py
pdfminer/Makefile
pdfminer/__init__.py

View File

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

1
TODO
View File

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

View File

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

View File

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