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

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

Functions

  • Returns true if the given stream is a tty.
  • 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
  • Write the optional prompt to the tty and read input from the tty Returns the String input (excluding newline)