Use bug-compatible SHA1 for longer passwords
commit2b375d8a7ea4feeb1d1f0e0d395f22bee890ec13
authorMarko Kreen <markokr@gmail.com>
Mon, 10 Jul 2017 11:05:34 +0000 (10 14:05 +0300)
committerMarko Kreen <markokr@gmail.com>
Mon, 10 Jul 2017 11:25:15 +0000 (10 14:25 +0300)
treea0865c446929f6d3f49460575ad26d7f94b1c725
parent320f99ab52cbb0b1a77756266c20dbeb3fea2c6b
Use bug-compatible SHA1 for longer passwords

There is ancient bug baked into format where SHA1
corrupts input data when S2K seed length is longer
than sha1 block size.  Happens with passwords longer
than 28 chars.

Fixes: #35
rarfile.py
test/test_hashing.py