delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/23/05:33:18

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Crypt()
Date: Wed, 22 Sep 1999 21:32:40 -0700
Organization: Harvey Mudd College
Lines: 51
Message-ID: <37E9AD68.C57795B7@hmc.edu>
References: <Pine DOT SOL DOT 4 DOT 10 DOT 9909230912560 DOT 14878-100000 AT cssu100 DOT cs DOT ust DOT hk>
NNTP-Posting-Host: mercury.st.hmc.edu
Mime-Version: 1.0
X-Trace: nntp1.interworld.net 938061186 19730 134.173.45.219 (23 Sep 1999 04:33:06 GMT)
X-Complaints-To: usenet AT nntp1 DOT interworld DOT net
NNTP-Posting-Date: 23 Sep 1999 04:33:06 GMT
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.13pre10 i586)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

You can get the glibc crypt implementation from ftp.gnu.org:/gnu/glibc,
but it may take a bit of porting to build without glibc.  There are
probably also other free Unix implementations which should be easy to
port and maybe more independent.

Wong Chun Fung Gary wrote:
> 
> 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.

-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019