electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 993a8acb3eea07d778fb8fb4ee1a2233f8899ff9
parent 284415145c502cc106fa3f1821cb5c5ac9f6958f
Author: ThomasV <thomasv1@gmx.de>
Date:   Tue, 19 Nov 2013 01:55:32 -0800

Merge pull request #442 from atanasi/atanasi

Allow password to have non-ASCII characters
Diffstat:
Mlib/bitcoin.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bitcoin.py b/lib/bitcoin.py @@ -53,7 +53,9 @@ def op_push(i): -Hash = lambda x: hashlib.sha256(hashlib.sha256(x).digest()).digest() +def Hash(x): + if type(x) is unicode: x=x.encode('utf-8') + return hashlib.sha256(hashlib.sha256(x).digest()).digest() hash_encode = lambda x: x[::-1].encode('hex') hash_decode = lambda x: x.decode('hex')[::-1]