How to implement an algorithm for storing and comparing hashes in 2048bits for passwords with random salt for each password with PHP?
EDIT 1:
I guess I was not clear enough in my question. What I mean is that I will not make my encryption algorithm. But how could store a password and salt. Being the random salt for each password. Well, it would not be sensible to store the salt along with the password in the database.
EDIT 2:
That would be a good approach?
1) user enters their password,
2) system generates a hash of the password,
3) system generates a password for this salt (I use time ()?)
Being the random salt, how and where could store the salt to the password? Please, I would not want to store the salt along with the password, because I think this is not so sure.
So after the stored password and the salt of the same when the user logs in, I get the password hashes stored along with the salt and compare it to the hash of the password supplied with the salt saved.
Where to save the salt? This would be a good approach to do this?