-
Notifications
You must be signed in to change notification settings - Fork 2
Utils
Meheret Tesfaye edited this page Apr 30, 2020
·
4 revisions
generate_entropy - Generate entropy hex string.
Parameter
strength (str) - Entropy strength, [default to 128].
Return
entropy (str) - Entropy hex string.
>>> from pybytom.utils import generate_entropy
>>> generate_entropy(strength=128)
"ee535b143b0d9d1f87546f9df0d06b1a"
generate_mnemonic - Generate 12 word mnemonic.
Parameter
language (str) - Mnemonic language, [default to english].
strength (str) - Entropy strength, [default to 128].
Return
mnemonic (str) - 12 word mnemonic.
>>> from pybytom.utils import generate_mnemonic
>>> generate_mnemonic(language="french")
"sceptre capter séquence girafe absolu relatif fleur zoologie muscle sirop saboter parure"
check_mnemonic - Check 12 word mnemonic.
Parameter
mnemonic (str) - 12 word mnemonic., [required].
language (str) - Mnemonic language, [default to None].
Return
mnemonic (bool) - True/False.
>>> from pybytom.utils import check_mnemonic
>>> check_mnemonic("sceptre capter séquence girafe absolu relatif fleur zoologie muscle sirop saboter parure")
True
get_mnemonic_language - Get mnemonic language.
Parameter
mnemonic (str) - 12 word mnemonic., [required].
Return
language (str) - Mnemonic language.
>>> from pybytom.utils import get_mnemonic_language
>>> get_mnemonic_language("sceptre capter séquence girafe absolu relatif fleur zoologie muscle sirop saboter parure")
"french"