version 1.42, 2015/10/10 18:14:20 |
version 1.43, 2016/09/02 17:06:59 |
|
|
#include <unistd.h> |
#include <unistd.h> |
#include <login_cap.h> |
#include <login_cap.h> |
#include <limits.h> |
#include <limits.h> |
|
#include <readpassphrase.h> |
|
|
/* |
/* |
* Very simple little program, for encrypting passwords from the command |
* Very simple little program, for encrypting passwords from the command |
|
|
} |
} |
|
|
if (((argc - optind) < 1)) { |
if (((argc - optind) < 1)) { |
char line[BUFSIZ], *string; |
char line[BUFSIZ]; |
|
char string[_PASSWORD_LEN + 1]; |
|
|
if (prompt) { |
if (prompt) { |
if ((string = getpass("Enter string: ")) == NULL) |
if (readpassphrase("Enter string: ", string, |
err(1, "getpass"); |
sizeof(string), RPP_ECHO_OFF) == NULL) |
|
err(1, "readpassphrase"); |
print_passwd(string, operation, extra); |
print_passwd(string, operation, extra); |
(void)fputc('\n', stdout); |
(void)fputc('\n', stdout); |
} else { |
} else { |