Exemplo n.º 1
0
def do_random_mn(nbytes,wordlist):
	hexrand = ba.hexlify(get_random(nbytes))
	Vmsg("Seed: %s" % hexrand)
	for wlname in (wordlists if wordlist == "all" else [wordlist]):
		if wordlist == "all":
			Msg("%s mnemonic:" % (wlname.capitalize()))
		mn = Mnemonic.hex2mn(hexrand,wordlist=wlname)
		Msg(" ".join(mn))
Exemplo n.º 2
0
def mn_printlist(wordlist=dfl_wordlist):
	wl = Mnemonic.get_wordlist(wordlist)
	Msg("\n".join(wl))
Exemplo n.º 3
0
def mn_stats(wordlist=dfl_wordlist):
	Mnemonic.check_wordlist(wordlist)
Exemplo n.º 4
0
def hextob32(s):
	b32a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
	Msg("".join(Mnemonic.hextobaseN(32,s,b32a)))
Exemplo n.º 5
0
def b32tohex(s):
	b32a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
	Msg(Mnemonic.baseNtohex(32,s,b32a))
Exemplo n.º 6
0
def mn2hex(s,wordlist=dfl_wordlist):
	hexnum = Mnemonic.mn2hex(s.split(),wordlist)
	Msg(hexnum)
Exemplo n.º 7
0
def hex2mn(s,wordlist=dfl_wordlist):
	mn = Mnemonic.hex2mn(s,wordlist)
	Msg(" ".join(mn))