readpass (3) - Linux Man Pages
readpass: read password
NAMEreadpass - read password
LIBRARYReadpass library (librpass, -lrpass)
The readpass() function reads in password from standard input. readpass displays the prompt, turns off character echo, and reads the password string of up to len number of characters or till a newline character, whichever occurs first. While reading password, readpass shows display character instead of actual input entered by user, and then turns on the character echo.
RETURN VALUEreadpass returns pointer to a dynamically allocated buffer holding the password, or NULL otherwise.
NOTEThe pointer returned, points to the password in its clear text form, thus user should take care of its confidentiality.
Secondly, don't forget to release memory (free(3)) allocated by readpass to store password.
BUGSIf you encounter any problems/bugs in working of readpass(), please send an email to <pj.pandit AT yahoo.co.in> mentioning about problem/bug; while doing so, do include 'readpass()' string in the subject line.
AUTHORPrasad J Pandit <pj.pandit AT yahoo.co.in>