Mail Archives: djgpp/1999/09/22/22:01:17
On Wed, 22 Sep 1999, Eli Zaretskii wrote:
>
> On 22 Sep 1999, Wong Chun Fung Gary wrote:
>
> > How can I get crypt work in DJGPP?
> > I've got to implement a password checking function.
>
> It would help if you explain what are your problems in implementing
> ``a password checking function''. If you mean you need to read a
> password from the user without echoing, you can use the library function
> `getpass' or `getlongpass'.
In fact, I would like to use the crypt function on most UN*X system.
This is the one I want to have:
$ man crypt
CRYPT(3) Library functions CRYPT(3)
NAME
crypt - password and data encryption
SYNOPSIS
#define _XOPEN_SOURCE
#include <unistd.h>
char *crypt(const char *key, const char *salt);
DESCRIPTION
crypt is the password encryption function. It is based on
the Data Encryption Standard algorithm with variations
intended (among other things) to discourage use of hard-
ware implementations of a key search.
key is a user's typed password.
salt is a two-character string chosen from the set
[a-zA-Z0-9./]. This string is used to perturb the algo-
rithm in one of 4096 different ways.
- Raw text -