check message length in mnemonic encode
This commit is contained in:
parent
30b608c6fb
commit
274c67f984
|
@ -1657,6 +1657,7 @@ n = 1626
|
||||||
# Instead, the digit represented by a word is variable, it depends on the previous word.
|
# Instead, the digit represented by a word is variable, it depends on the previous word.
|
||||||
|
|
||||||
def mn_encode( message ):
|
def mn_encode( message ):
|
||||||
|
assert len(message) % 8 == 0
|
||||||
out = []
|
out = []
|
||||||
for i in range(len(message)/8):
|
for i in range(len(message)/8):
|
||||||
word = message[8*i:8*i+8]
|
word = message[8*i:8*i+8]
|
||||||
|
|
Loading…
Reference in New Issue