03/10/20 19:33 NiEPHFZI
自作PerlスクリプトをPHP化してますが、以下の部分をPHP化する方法が分かりません。
どなたかお願いします。
$salt = &createSalt;
sub createSalt {
local( $salt_paire, $salt1, $salt2, $salt);
$salt_paire =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
srand(time/$$);
$salt1 = int( rand(63) );
srand(time|$$);
$salt2 = int( rand(63) );
$salt1 = substr( $salt_paire, $salt1, 1);
$salt2 = substr( $salt_paire, $salt2, 1);
$salt = "$salt1$salt2";
return ($salt);
}
$passwd = crypt($newkey, $salt);