예제 #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))