1
2
3
4
5
6
7
8
9
10readpass(3)                Library Functions Manual                readpass(3)
11
12
13

NAME

15       readpass - read password
16

LIBRARY

18       Readpass library (librpass, -lrpass)
19

SYNOPSIS

21       #include <readpass.h>
22
23       char * readpass(const char * prompt, char display, size_t len);
24

DESCRIPTION

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

RETURN VALUE

34       readpass returns pointer to a dynamically allocated buffer holding  the
35       password, or NULL otherwise.
36

NOTE

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

BUGS

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

SEE ALSO

51       tlock(1)  free(3)  crypt(3)
52

AUTHOR

54       Prasad J Pandit <pj.pandit AT yahoo.co.in>
55
56
57
58                                                                   readpass(3)
Impressum