Ok, I need to store a password in a var, so I want to encrypt it using the md5 function. Now the only problem, I need the password back out of md5 to run a db connection. can I even take a md5 hash and convert it back to the origonal form??? if so what do I need to do. Also if i cant what would be the best way to do what I am trying?
I am pretty sure that you can't decrypt md5 encryption but there are other ways to encrypt data in PHP so that you can then convert them back. Should have a look at the Mcrypt Encryption Functions and this
Yep, md5 is a one-way hash. Very secure, but not reversible. If you really need to store a db connection password in a database, then as Wien said, you need to look to standard encryption functions, not hashing functions.
Unless of course - you set the DB connection password to be the MD5 hash....
hmmm, i dont know why i didnt think of setting the db pass to the hashed password, thanks
Has the md5() standard output for standard words?
For example md5("php")=a standard value? always?
yeah, the md5 uses the RAS MD5 hash, so if you put in your password and hashed it with md5 no matter how many times you ran it, it would come out the same thing every time
on every system?
nope