in reply to Re: crypt function has string length limit?
in thread crypt function has string length limit?
The CPAN library contains both pure-Perl and XS (binary) implementations of crypt() functions, although you would have to experiment or check the source-code to see if they follow the 8-character password convention.
Actually, perls builtin crypt uses the crypt(3) the platform provides, on which perl has been compiled. If the platform sports glibc2, then perls builtin crypt supports all crypting flavors the glibc2 crypt(3) provides.
So, to use a better crypt, on a modern system no CPAN modules are necessary, just check the manpage of crypt(3). To wit:
If salt is a character string starting with the characters "$id$" followed by a string terminated by "$":
ID Method 1 MD5 2a Blowfish (not in mainline glibc; added in some Linux distributions) 5 SHA-256 (since glibc 2.7) 6 SHA-512 (since glibc 2.7)
The DES algorithm taking a 2-char salt and a 8-char password is considered insecure, as are MD5 and SHA1. Don't use them..
The post I am replying to is yet another example of sundialsvc4 providing outdated and therefore possibly harmful information. See man crypt on your system.
sundialsvc4, please update your knowledge every now and then by RTFM. See my sig; and see jackass.
|
|---|