Skip to content

Commit 685a74a

Browse files
committed
Handle serialized PrivKeys
e.g. Namecoin-Qt
1 parent b52c955 commit 685a74a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pywallet.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,6 +2580,11 @@ def rnip_callback(a):
25802580
public_key = k['pubkey'].decode('hex')
25812581
crypter.SetIV(Hash(public_key))
25822582
secret = crypter.Decrypt(ckey)
2583+
2584+
# some coins (e.g. NamecoinQ) store keys in serialized format
2585+
if len(secret) > 32:
2586+
secret = PrivKeyToSecret(secret)
2587+
25832588
compressed = public_key[0] != '\04'
25842589

25852590

0 commit comments

Comments
 (0)