Perl crypt()

Tobias Burnus tobias.burnus at physik.fu-berlin.de
Wed Aug 13 09:56:18 UTC 2003


Hi,

On Wed, 13 Aug 2003, Mark Ingram wrote:
> Is there any documentation other than
> http://www.perldoc.com/perl5.8.0/pod/func/crypt.html which would allow me to
> re-create the crypt function so i can check logins correctly?

Well, the crypt manpage looks like this:
  http://www.die.net/doc/linux/man/man3/crypt.3.html

The problem is that according to
IEEE Std 1003.1, 2003 Edition, http://www.unix.org/single_unix_specification/
"The crypt() function is a string encoding function. The algorithm is
implementation-defined. [...] The values returned by this function [crypt]
need not be portable among XSI-conformant systems."
(version 2: http://www.opengroup.org/onlinepubs/7908799/xsh/crypt.html)
But de-facto are the hashes compatible between different unix systems.

I can't find a good implementation reference, but you might want to try
http://www.dynamic.net.au/christos/crypt/UnixCrypt.txt
as a pointer.

Tobias




More information about the developers mailing list