Coder's Guild Mailing List

Re: How can I encrypt the text..

Posted by peter@xxxxxxxxx.xxx (Peter Palfrader) on 2001-05-13

Hi Bhakti!

Bhakti schrieb am Friday, dem 04. May 2001:

> Hi all,
> I am new in Perl, so please tech how to encrypt the text, eg. password,
> Is the command crypt in Perl has to do with this?

Yes, you can use the perl crypt() command to encrypt passwords.
Since this is the old unic crypt function, only the first 8 characters
of the input are significant.

To verify that the passwd is correct upon authorization, you take
the salt you used to generate the hash, (it's the first or last two
charaters - don't remember) and rerun crypt() with the entered
passwd. If the hash matches the one you have on file access should
be granted.

HTH

					yours,
					peter

-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
    messages preferred.    | : :' :    By professionals,
                           | `. `'      for professionals
 http://www.palfrader.org/ |   `-    http://www.debian.org/