I’d just like to know if this script is secure enough for a password encryption:
<?php
$password = 'password';
$salt = '9awd8n12jok1llawawf';
$new = hash($password . $salt, 'ripemd160');
final = strrev($new);
?>
Thanks.
Don’t use the same salt for every password. Normally what you’ll want to do is use some replicable value as the salt. For example, some hash of the user id (if the user id never changes), or some random string that you save with the user account information. The salt should never be visible to the end user.