You are here: Re: pear's crypt to php « PHP Language « IT news, forums, messages
Re: pear's crypt to php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация