So we're rewriting a Perl application in Cold Fusion, problem is I don't know Perl, but can follow the logic well enough to get by. I have hit a roadblock though. Perl encrypts the password with the following code:
$alphabet = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
substr($salt, 0, 1) = substr($alphabet, rand(63), 1);
substr($salt, 1, 1) = substr($alphabet, rand(63), 1);
$password = substr($ssn,3,6);
$enc_password = crypt($password, $salt);
$password = $enc_password;
Is there any way to duplicate this in Cold Fusion?
If not, any bright ideas?
$alphabet = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
substr($salt, 0, 1) = substr($alphabet, rand(63), 1);
substr($salt, 1, 1) = substr($alphabet, rand(63), 1);
$password = substr($ssn,3,6);
$enc_password = crypt($password, $salt);
$password = $enc_password;
Is there any way to duplicate this in Cold Fusion?
If not, any bright ideas?