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))
def hex2mn(s,wordlist=dfl_wordlist): mn = Mnemonic.hex2mn(s,wordlist) Msg(" ".join(mn))