|
Posted by Janwillem Borleffs on 07/22/05 23:48
steve wrote:
> I have a set of passwords encrypted using perl's crypt, from a perl
> forum being migrated to php.
>
> I like to bring them into php, and use them without changing them.
> How do I emulate perl's crypt function.
>
> I found a pear module here:
> http://pear.php.net/package/Crypt_CBC/docs/0.3/Crypt/Crypt_CBC.html
> but it seems to only take one argument, whereas perl's crypt should
> take two args (?).
>
Using Perl:
my $string = 'the string';
my $salt = 'secret';
print crypt $string, $salt; # Prints sewZw1OY/.llM
Using http://www.php.net/crypt:
$string = 'the string';
$salt = 'secret';
print crypt($string, $salt); # Prints sewZw1OY/.llM
JW
Navigation:
[Reply to this message]
|