To over answer your question, here's the PHP function I came up with to make use of the openssl shell command to do the encryption. Hope it helps:
PHP Code:
function passwd($password,$salt=""){
if(!$salt) return exec('openssl passwd -1 "'.$password.'"');
else{
$salt = str_replace(" ", "", $salt);
return exec('openssl passwd -1 -salt '.$salt.' "'.$password.'"');
}
}