readpassphrase

Crates.ioreadpassphrase
lib.rsreadpassphrase
version0.2.0
sourcesrc
created_at2021-07-15 05:00:01.221367
updated_at2021-07-22 01:01:42.665732
descriptionRust API for OpenBSD's readpassphrase
homepage
repositoryhttps://github.com/orvij/readpassphrase
max_upload_size
id422980
size8,949
(orvij)

documentation

README

High level Rust API to OpenBSD's readpassphrase function.

From man 3 readpassphrase:

    The readpassphrase() function displays a prompt to, and reads in a
    passphrase from, /dev/tty.  If this file is inaccessible and the
    RPP_REQUIRE_TTY flag is not set, readpassphrase() displays the prompt on
    the standard error output and reads from the standard input.  In this
    case it is generally not possible to turn off echo.
    
    Up to bufsiz - 1 characters (one is for the NUL) are read into the
    provided buffer buf.  Any additional characters and the terminating
    newline (or return) character are discarded.
    
    The flags argument is the bitwise OR of zero or more of the following
    values:
    
          RPP_ECHO_OFF            turn off echo (default behavior)
          RPP_ECHO_ON             leave echo on
          RPP_REQUIRE_TTY         fail if there is no tty
          RPP_FORCELOWER          force input to lower case
          RPP_FORCEUPPER          force input to upper case
          RPP_SEVENBIT            strip the high bit from input
          RPP_STDIN               read passphrase from stdin; ignore prompt
Commit count: 0

cargo fmt