Date: Thu, 23 Sep 1999 09:14:39 +0800 (HKT) From: Wong Chun Fung Gary To: Eli Zaretskii cc: djgpp AT delorie DOT com Subject: Re: Crypt() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 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.