http://mmgen-wallet.i2p/project/mmgen/mmgen-wallet/src/d326c96af83f5e5102009e6b94817be173e27aa6/mmgen/bip39.py
If not, see <http://www.gnu.org/licenses/>. """ bip39.py - Data and routines for BIP39 mnemonic seed phrases """ from hashlib import sha256 from .baseconv import baseconv from .util import is_hex_str,die def is_bip39_mnemonic(s): return bool( bip39().tohex(s.split()) ) # implements a subset of the baseconv API class bip39(baseconv): desc = baseconv.dt('BIP39 mnemonic', 'BIP39 mnemonic seed phrase') wl_chksum = 'f18b9a84' seedlen_map = { 16:12, 24:18, 32:24 } seedlen_map_rev = { 12:16,...