Crate passterm

Source
Expand description

§Terminal utilities

Use the prompt_password_tty function to read a password from the tty.

Use the isatty function to check if the given stream is a tty.

§Features

Enable the secure_zero feature to zero out data read from the tty.

Enums§

PromptError
Returned if there is an issue getting user input from STDIN or if echo could not be disabled.
Stream
Stream represents the Stdin, Stdout, and Stderr streams.

Functions§

isatty
Returns true if the given stream is a tty.
prompt_password_stdin
Write the optional prompt to the specified stream. Reads the password from STDIN. Does not include the newline. The stream must be Stdout or Stderr
prompt_password_tty
Write the optional prompt to the tty and read input from the tty Returns the String input (excluding newline)