pear’s crypt to php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steve

    pear’s crypt to php

    Hi,
    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:

    but it seems to only take one argument, whereas perl’s crypt should
    take two args (?).

    Please help.

    steve

    --
    Posted using the http://www.dbforumz.com interface, at author's request
    Articles individually checked for conformance to usenet standards
    Topic URL: http://www.dbforumz.com/PHP-pear-cry...ict242528.html
    Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=842704
  • Janwillem Borleffs

    #2
    Re: pear's crypt to php

    steve wrote:[color=blue]
    > 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_CB...Crypt_CBC.html
    > but it seems to only take one argument, whereas perl's crypt should
    > take two args (?).
    >[/color]

    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



    Comment

    Working...