[nSLUG] Crypt in Perl

Daniel MacKay daniel at bonmot.ca
Wed Jan 7 14:04:43 AST 2009


>> old FreeBSD:
>> $ perl -e 'print crypt("cow","xy") . "\n";'
>> xytJwuhSBf7w.
>>
>> modern Linux:
>> $ perl -e 'print crypt("cow","xy") . "\n";'
>> xytJwuhSBf7w.
>>
>> This matches.
>>
>> But with a salt of a single letter, say "X", things are different:
>>
>> old FreeBSD:
>> $ perl -e 'print crypt("cow","X") . "\n";'
>> XXI4zfZAWwgt6
>>
>> modern Linux:
>> $ perl -e 'print crypt("cow","X") . "\n";'
>> XX6CWUsAaU4R.

Mac (BSDish) : X.I4zfZAWwgt6

Solaris 10 (Sys 5ish) : XX6CWUsAaU4R.





More information about the nSLUG mailing list