encryption is this a good way to do it (PHP)
I edit my post aboth :S
the info on it is a bit crap but im sure we can work it out :)
Using it in my CMS as Sha512 is not good enough :S as it will sort my company's details etc dont want people
Ah, my apologies, I replied before seeing the edit. Storing the salt along with the hash isn't a problem since you would need it to be able to reproduce the hash regardless of implementation. The cost is an option to basically change the effort needed to hash the string. However, the library (and the 5.5 spec) provide reasonable defaults for this, meaning that all you need to do to hash a password is something like:
$hash = password_hash($password, PASSWORD_BCRYPT);
Then to check the password, use the password_verify() function, as shown under the 'verifying passwords' section on the gist I linked to a few posts ago.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now