From 685a74abeae8ea25e783615ebd2b1f430bb53d31 Mon Sep 17 00:00:00 2001 From: phelixbtc Date: Wed, 14 Jan 2015 20:52:36 +0100 Subject: [PATCH] Handle serialized PrivKeys e.g. Namecoin-Qt --- pywallet.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pywallet.py b/pywallet.py index 0ffb33b..aa249f6 100644 --- a/pywallet.py +++ b/pywallet.py @@ -2580,6 +2580,11 @@ def rnip_callback(a): public_key = k['pubkey'].decode('hex') crypter.SetIV(Hash(public_key)) secret = crypter.Decrypt(ckey) + + # some coins (e.g. NamecoinQ) store keys in serialized format + if len(secret) > 32: + secret = PrivKeyToSecret(secret) + compressed = public_key[0] != '\04'