electrum_v1_entropy_generator

Module for Electrum v1 mnemonic entropy generation.

class ElectrumV1EntropyBitLen(value)

Bases: IntEnum

Enumerative for Electrum entropy bit lengths (v1).

BIT_LEN_128 = 128
class ElectrumV1EntropyGeneratorConst

Bases: object

Class container for Electrum entropy generator constants (v1).

ENTROPY_BIT_LEN: List[ElectrumV1EntropyBitLen] = [<ElectrumV1EntropyBitLen.BIT_LEN_128: 128>]
class ElectrumV1EntropyGenerator(bit_len: Union[int, ElectrumV1EntropyBitLen] = ElectrumV1EntropyBitLen.BIT_LEN_128)

Bases: EntropyGenerator

Electrum entropy generator class (v1). It generates random entropy bytes.

static IsValidEntropyBitLen(bit_len: int) bool

Get if the specified entropy bit length is valid.

Parameters:

bit_len (int) – Entropy length in bits

Returns:

True if valid, false otherwise

Return type:

bool

static IsValidEntropyByteLen(byte_len: int) bool

Get if the specified entropy byte length is valid.

Parameters:

byte_len (int) – Entropy length in bytes

Returns:

True if valid, false otherwise

Return type:

bool

m_bit_len: int