Description |
|
This routine reads a password from the keyboard. The first *size_return bytes
of the password entered are returned in return_pwd.
If fewer than *size_return bytes are typed
as a password, the remainder of return_pwd is
zeroed. Upon success, the total number of bytes filled in is stored
in *size_return.
The prompt argument is used as the
prompt for the first reading of a password. It is printed to the
terminal, and then a password is read from the keyboard. No newline
or spaces are emitted between the prompt and the cursor, unless
the newline/space is included in the prompt.
If prompt2 is a NULL pointer, then
the password is read once.
If prompt2 is set, then it is used
as a prompt to read another password in the same manner as described
for prompt. After the second password
is read, the two passwords are compared, and an error is returned
if they are not identical.
Echoing is turned off when the password is read.