Exemple #1
0
def get_passphrase_always_on_device() -> bool:
    """
    This is backwards compatible with _PASSPHRASE_SOURCE:
    - If ASK(0) => returns False, the check against b"\x01" in get_bool fails.
    - If DEVICE(1) => returns True, the check against b"\x01" in get_bool succeeds.
    - If HOST(2) => returns False, the check against b"\x01" in get_bool fails.
    """
    return common.get_bool(_NAMESPACE, _PASSPHRASE_ALWAYS_ON_DEVICE)
Exemple #2
0
def get_passphrase_always_on_device() -> bool:
    """
    This is backwards compatible with _PASSPHRASE_SOURCE:
    - If ASK(0) => returns False, the check against b"\x01" in get_bool fails.
    - If DEVICE(1) => returns True, the check against b"\x01" in get_bool succeeds.
    - If HOST(2) => returns False, the check against b"\x01" in get_bool fails.
    """
    # Some models do not support passphrase input on device
    if utils.MODEL in ("1", "R"):
        return False
    return common.get_bool(_NAMESPACE, _PASSPHRASE_ALWAYS_ON_DEVICE)
Exemple #3
0
def is_initialized() -> bool:
    return common.get_bool(_NAMESPACE, INITIALIZED, public=True)
Exemple #4
0
def _get_experimental_features() -> bytes:
    if common.get_bool(_NAMESPACE, _EXPERIMENTAL_FEATURES):
        return b"\x01"
    else:
        return b""
Exemple #5
0
def no_backup() -> bool:
    return common.get_bool(_NAMESPACE, _NO_BACKUP)
Exemple #6
0
def unfinished_backup() -> bool:
    return common.get_bool(_NAMESPACE, _UNFINISHED_BACKUP)
Exemple #7
0
def needs_backup() -> bool:
    return common.get_bool(_NAMESPACE, _NEEDS_BACKUP)
Exemple #8
0
def is_passphrase_enabled() -> bool:
    return common.get_bool(_NAMESPACE, _USE_PASSPHRASE)
Exemple #9
0
def get_experimental_features() -> bool:
    return common.get_bool(_NAMESPACE, _EXPERIMENTAL_FEATURES)
def is_dry_run() -> bool:
    _require_progress()
    return common.get_bool(_NAMESPACE, _DRY_RUN)
def is_in_progress() -> bool:
    return common.get_bool(_NAMESPACE, _IN_PROGRESS)
Exemple #12
0
def unsafe_prompts_allowed() -> bool:
    return common.get_bool(_NAMESPACE, _UNSAFE_PROMPTS_ALLOWED)
Exemple #13
0
def has_passphrase() -> bool:
    return common.get_bool(_NAMESPACE, _USE_PASSPHRASE)