check message length in mnemonic encode

This commit is contained in:
ThomasV 2014-06-03 09:35:34 +02:00
parent 30b608c6fb
commit 274c67f984
1 changed files with 1 additions and 0 deletions

View File

@ -1657,6 +1657,7 @@ n = 1626
# Instead, the digit represented by a word is variable, it depends on the previous word.
def mn_encode( message ):
assert len(message) % 8 == 0
out = []
for i in range(len(message)/8):
word = message[8*i:8*i+8]