I am running a ProFTPD Server on Ubuntu 12.04 and do the user authentication with MySQL. I am looking for a secure way to hash passwords.
There a lot of built-in hash functions in MySQL, but a lot of them are deprecated, such as MD5 or SHA1. The best built-in hash function in MySQL I saw was encrypt
, that uses the Unix function crypt
. A positive aspect of encrypt
is that the hash could be generated with salt.
According to the MySQL manual, encrypt
is deprecated because it uses DES and it will be removed in a future version. But according to this question only the old version of the Unix crypt
function uses DES and is outdated. Newer versions of the crypt
function should be fine.
Do you recommend to use encrypt
in MySQL? Does encrypt
create a secure hash?