C library for reading secrets or passwords from a command line, like getpass() only better.
C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.txt
Makefile
README.md
README.txt
SConstruct
readsecret.c
readsecret.h
testpass.c

README.md

readsecret

Readsecret is a simple self-contained C (or C++) library intended to be used on Unix and Unix-like operating systems that need to read a password or other textual secret typed in by the user while in a text-mode environment, such as from a console or shell.

It is similar in purpose to the GNU getpass() function but it has more features, is more secure, and more robust against failures. For more about GNU getpass, see http://www.gnu.org/s/hello/manual/libc/getpass.html

  • Can manage timed inputs
  • Handles interrupts and signals more robustly
  • Can prevent core-file dumping during entry to avoid secret disclosure
  • Securely overwrites memory, better than memset()
  • Reentrant and state-free
  • Conservative error handling and reporting

More information

Complete documentation and additional information is available on the readsecret project homepage.