Jump to content

How to encrypt a string using a key?


benphp

Recommended Posts

you mean $key would be a numeric salt.. or would be converted to a number and then used as salt? manually salted algorithms don't really work with systems where a user will log in and out lots of times, because you'll have an extra task of being able to match the password again if you want to confirm the user for being authentic

do you mean something like md5?

 

then when logging in it would decrypt that?

MD5 isn't an encryption, it's a hash algorithm which is one way; so it's not possible to decrypt it.

When logging in, you hash the entered password as well, then compare that with the stored hash... you don't decrypt ever because you can't

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.