Skip to content

Commit

Permalink
fix error in converting encrypted field to base64
Browse files Browse the repository at this point in the history
  • Loading branch information
cfbao committed May 25, 2018
1 parent b4ed2ee commit 6debb30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lpparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ def aes_decrypt_lpbin_soft(ivData, key, raiseCond=None, terminateCond=None):
if e.args[0] in terminateCond:
fail('ERROR: corrupted vault', 1)
if e.args[0] != 'format':
res = '!' + b2a_base64(ivData[:16]).decode('utf-8').strip() \
+ '|' + b2a_base64(ivData[16:]).decode('utf-8').strip()
res = '!' + b2a_base64(ivData[1:17]).decode('utf-8').strip() \
+ '|' + b2a_base64(ivData[17:]).decode('utf-8').strip()
else:
res = ivData.hex()
return res
Expand Down

0 comments on commit 6debb30

Please sign in to comment.