コード例 #1
0
def set_slip39_iteration_exponent(exponent: int) -> None:
    """
    The device's actual SLIP-39 iteration exponent used in passphrase derivation.
    Not to be confused with recovery.iteration_exponent, which is stored only during
    the recovery process and it is copied here upon success.
    """
    common.set_uint8(_NAMESPACE, _SLIP39_ITERATION_EXPONENT, exponent)
コード例 #2
0
def store_mnemonic_secret(
    secret: bytes,
    backup_type: EnumTypeBackupType,
    needs_backup: bool = False,
    no_backup: bool = False,
) -> None:
    set_version(common.STORAGE_VERSION_CURRENT)
    common.set(_NAMESPACE, _MNEMONIC_SECRET, secret)
    common.set_uint8(_NAMESPACE, _BACKUP_TYPE, backup_type)
    common.set_true_or_delete(_NAMESPACE, _NO_BACKUP, no_backup)
    if not no_backup:
        common.set_true_or_delete(_NAMESPACE, _NEEDS_BACKUP, needs_backup)
コード例 #3
0
def set_slip39_iteration_exponent(exponent: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_ITERATION_EXPONENT, exponent)
コード例 #4
0
def set_slip39_group_count(group_count: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_COUNT, group_count)
コード例 #5
0
ファイル: recovery.py プロジェクト: zhou-peter/autoSTM32
def set_slip39_threshold(threshold: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_THRESHOLD, threshold)
コード例 #6
0
ファイル: recovery.py プロジェクト: tomtau/trezor-firmware
def set_slip39_group_threshold(group_threshold: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_THRESHOLD, group_threshold)
コード例 #7
0
ファイル: recovery.py プロジェクト: tomtau/trezor-firmware
def set_slip39_group_count(group_count: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_COUNT, group_count)
コード例 #8
0
ファイル: recovery.py プロジェクト: tomtau/trezor-firmware
def set_slip39_threshold(threshold: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_THRESHOLD, threshold)
コード例 #9
0
ファイル: recovery.py プロジェクト: tomtau/trezor-firmware
def set_word_count(count: int) -> None:
    common.set_uint8(_NAMESPACE, _WORD_COUNT, count)