From: Chengcheng Zhang <943420582@qq.com> Date: Mon, 14 Jan 2019 08:02:48 +0000 (+0800) Subject: fix bug X-Git-Url: http://git.osdn.net/view?p=bytom%2Fbytom-kit.git;a=commitdiff_plain;h=66f0fafd25727df707c08028af0c48fd834d0cd2 fix bug --- diff --git a/app/model/key.py b/app/model/key.py index 88dc169..7fc1041 100644 --- a/app/model/key.py +++ b/app/model/key.py @@ -41,9 +41,9 @@ def entropy_to_mnemonic(entropy_str): for _ in range(mnemonic_length): mnemonic_list.append('') - entropy_bytes = bytes.fromhex(entropy_str) + entropy_bytes = bytes.fromhex(entropy_str[:32]) checksum = hashlib.sha256(entropy_bytes).hexdigest()[:1] - new_entropy_str = "0" + entropy_str + checksum + new_entropy_str = "0" + entropy_str[:32] + checksum new_entropy_bytes = bytes.fromhex(new_entropy_str) new_entropy_int = int.from_bytes(new_entropy_bytes, byteorder='big') diff --git a/page3.html b/page3.html index 4e778e9..44f1e8b 100644 --- a/page3.html +++ b/page3.html @@ -5,7 +5,7 @@ - Bytom + Bytom Kit @@ -17,7 +17,7 @@