示例#1
0
文件: tool.py 项目: etherume/mmgen
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))
示例#2
0
文件: tool.py 项目: etherume/mmgen
def mn_printlist(wordlist=dfl_wordlist):
	wl = Mnemonic.get_wordlist(wordlist)
	Msg("\n".join(wl))
示例#3
0
文件: tool.py 项目: etherume/mmgen
def mn_stats(wordlist=dfl_wordlist):
	Mnemonic.check_wordlist(wordlist)
示例#4
0
文件: tool.py 项目: etherume/mmgen
def hextob32(s):
	b32a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
	Msg("".join(Mnemonic.hextobaseN(32,s,b32a)))
示例#5
0
文件: tool.py 项目: etherume/mmgen
def b32tohex(s):
	b32a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
	Msg(Mnemonic.baseNtohex(32,s,b32a))
示例#6
0
文件: tool.py 项目: etherume/mmgen
def mn2hex(s,wordlist=dfl_wordlist):
	hexnum = Mnemonic.mn2hex(s.split(),wordlist)
	Msg(hexnum)
示例#7
0
文件: tool.py 项目: etherume/mmgen
def hex2mn(s,wordlist=dfl_wordlist):
	mn = Mnemonic.hex2mn(s,wordlist)
	Msg(" ".join(mn))