コード例 #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))