Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2000 07:10:02 -0800 (PST)
From:      Daniel Hagan <dhagan@cs.vt.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/16278: Perl crypt() returns bogus data?
Message-ID:  <200003081510.HAA01080@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/16278; it has been noted by GNATS.

From: Daniel Hagan <dhagan@cs.vt.edu>
To: freebsd-gnats-submit@freebsd.org
Cc: racker75@hotmail.com
Subject: Re: misc/16278: Perl crypt() returns bogus data?
Date: Wed, 8 Mar 2000 10:00:08 -0500 (EST)

 > Using perl, crypt() returns long, unintelligable values.  For example,
 > the perl installed with 3.3-RELEASE produces these results:
 >         $salt = 'fs';
 >         $pass = 'heynow';
 >         $out = crypt($salt, $pass);
 >         print "$out\n"; 
 >    returns this:
 >    bash-2.03$ perl test3.pl
 >    $1$heynow$0jPK61iCt92vyGs2ciUUa.
 
 man crypt(3) shows that crypt expects crypt(password, salt), not
 vice-versa.  If you switch the arguments you will probably get the correct
 result.  Also, I believe the $1$ at the start indicates that this is a MD5
 password, and thus won't necessarily match other crypt() calls (on other
 UNIXs).
 
 Daniel
 
 -- 
 Daniel Hagan                                             Computer Science CSE
 dhagan@cs.vt.edu                                http://www.cs.vt.edu/~dhagan/
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003081510.HAA01080>