tMerge pull request #3017 from SomberNight/fix_is_minikey - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f381eae25134bbeeafee047f9cc495278f7bcfaf DIR parent 4694717dc0651f5aedfdb0d0d395a586242f4ab1 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 11 Oct 2017 16:35:08 +0200 Merge pull request #3017 from SomberNight/fix_is_minikey fix: bitcoin.is_minikey() is broken Diffstat: M lib/bitcoin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/bitcoin.py b/lib/bitcoin.py t@@ -572,8 +572,8 @@ def is_minikey(text): # suffixed with '?' have its SHA256 hash begin with a zero byte. # They are widely used in Casascius physical bitoins. return (len(text) >= 20 and text[0] == 'S' - and all(c in __b58chars for c in text) - and ord(sha256(text + '?')[0]) == 0) + and all(ord(c) in __b58chars for c in text) + and sha256(text + '?')[0] == 0x00) def minikey_to_private_key(text): return sha256(text)