Skip to main content

Module password

Module password 

Source
Expand description

Shared password handling utilities.

Functionsยง

prompt_for_password
Prompt user for password
prompt_for_password_with_confirmation
Prompt user for password with confirmation
read_password_from_file
Reads a password from a file for non-interactive use. A single trailing newline (as left by most editors and echo) is stripped; everything else is taken verbatim.
resolve_encryption_password
Password for encryption: read from password_file when given (strength requirements still apply, but no confirmation is needed since there is no typo risk), otherwise prompt interactively with confirmation.
resolve_password
Password for decryption or listing: read from password_file when given, otherwise prompt interactively.
validate_password_format