git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
30b608c
)
check message length in mnemonic encode
author
ThomasV
<thomasv@gitorious>
Tue, 3 Jun 2014 07:35:34 +0000 (09:35 +0200)
committer
ThomasV
<thomasv@gitorious>
Tue, 3 Jun 2014 07:35:34 +0000 (09:35 +0200)
lib/mnemonic.py
patch
|
blob
|
history
diff --git
a/lib/mnemonic.py
b/lib/mnemonic.py
index
82d2624
..
f5643ed
100644
(file)
--- a/
lib/mnemonic.py
+++ b/
lib/mnemonic.py
@@
-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]