1
2
3
4
5
6
7
8
9
10readpass(3) Library Functions Manual readpass(3)
11
12
13
15 readpass - read password
16
18 Readpass library (librpass, -lrpass)
19
21 #include <readpass.h>
22
23 char * readpass(const char * prompt, char display, size_t len);
24
26 The readpass() function reads in password from standard input. read‐
27 pass displays the prompt, turns off character echo, and reads the pass‐
28 word string of up to len number of characters or till a newline charac‐
29 ter, whichever occurs first. While reading password, readpass shows
30 display character instead of actual input entered by user, and then
31 turns on the character echo.
32
34 readpass returns pointer to a dynamically allocated buffer holding the
35 password, or NULL otherwise.
36
38 The pointer returned, points to the password in its clear text form,
39 thus user should take care of its confidentiality.
40
41 Secondly, don't forget to release memory (free(3)) allocated by read‐
42 pass to store password.
43
45 If you encounter any problems/bugs in working of readpass(), please
46 send an email to <pj.pandit AT yahoo.co.in> mentioning about prob‐
47 lem/bug; while doing so, do include 'readpass()' string in the subject
48 line.
49
51 tlock(1) free(3) crypt(3)
52
54 Prasad J Pandit <pj.pandit AT yahoo.co.in>
55
56
57
58 readpass(3)