Link to home
Start Free TrialLog in
Avatar of DigitalDave1
DigitalDave1

asked on

How to do encryption in PHP equal to Perl's bz_crypt() function?

What is the equivalent PHP code for the following Perl code?
(Note there is no salt arg, there is just one argument for a plaintext $password.)
I need to be able to create the identical encrypted password as in Perl.
my $cryptpassword = bz_crypt($password);

Open in new window

Avatar of eft0
eft0
Flag of Chile image

PHP now contains its own implementation for the MD5 crypt, Standard DES, Extended DES and the Blowfish algorithms and will use that if the system lacks of support for one or more of the algorithms.

You can get more info at: http://php.net/crypt
$cryptpassword = crypt($password);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of DigitalDave1
DigitalDave1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial