As per title.
I'm trying to take some data from one database to a database used by PerlDesk. However, it uses encryption which I need a bit of help deciphering..
Can anyone explain to me / write the PHP code to take a raw password, and encrypt it using the above method?
Cheers
I'm trying to take some data from one database to a database used by PerlDesk. However, it uses encryption which I need a bit of help deciphering..
Code:
($salt) = $password =~ m/^(..)/;
require Digest::MD5;
my $md5 = Digest::MD5->new;
$md5->reset;
my $yday = (localtime)[7];
my $certif = $user . $yday . "pd-$salt" . $ENV{'HTTP_USER_AGENT'} . $ENV{'REMOTE_ADDR'}
if $IP_IN_COOKIE;
$certif = $user . $yday . "pd-$salt" . $ENV{'HTTP_USER_AGENT'} if !$IP_IN_COOKIE;
$md5->add($certif);
my $enc_cert = $md5->hex
Can anyone explain to me / write the PHP code to take a raw password, and encrypt it using the above method?
Cheers