Skip to content

Commit

Permalink
Merge pull request steemit#277 from steemit/AlexChien-fix-addkey-error
Browse files Browse the repository at this point in the history
Community - fix missing positional argument: mode
  • Loading branch information
roadscape authored Feb 6, 2019
2 parents e842a6b + 5379613 commit 57fb0f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions steembase/bip38.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def encrypt(privkey, passphrase):
else:
raise ValueError("No scrypt module loaded")
(derived_half1, derived_half2) = (key[:32], key[32:])
aes = AES.new(derived_half2)
aes = AES.new(derived_half2, AES.MODE_ECB)
encrypted_half1 = _encrypt_xor(privkeyhex[:32], derived_half1[:16], aes)
encrypted_half2 = _encrypt_xor(privkeyhex[32:], derived_half1[16:], aes)
" flag byte is forced 0xc0 because Graphene only uses compressed keys "
Expand Down Expand Up @@ -121,7 +121,7 @@ def decrypt(encrypted_privkey, passphrase):
derivedhalf2 = key[32:64]
encryptedhalf1 = d[0:16]
encryptedhalf2 = d[16:32]
aes = AES.new(derivedhalf2)
aes = AES.new(derivedhalf2, AES.MODE_ECB)
decryptedhalf2 = aes.decrypt(encryptedhalf2)
decryptedhalf1 = aes.decrypt(encryptedhalf1)
privraw = decryptedhalf1 + decryptedhalf2
Expand Down

0 comments on commit 57fb0f1

Please sign in to comment.