cloudll Posted May 25, 2015 Share Posted May 25, 2015 (edited) Hey guys. I have been looking into encrypting a large string before entering it into my database and then decrypting it again in a secure user area. There seems to be a few ways to go around doing this, I was wondering if anyone could recommend which method/function works best? Thanks Edited May 25, 2015 by cloudll Quote Link to comment Share on other sites More sharing options...
fastsol Posted May 26, 2015 Share Posted May 26, 2015 What kind of information are you storing that you need to encrypt only to decrypt to show it to the same person that gave it to you? Some more details from you would give us a better comprehension of your goal and how to advise you. Quote Link to comment Share on other sites More sharing options...
cloudll Posted May 26, 2015 Author Share Posted May 26, 2015 It probably doesn't need to be encryped. I'm doing this more to learn more about it. Its not for a real project or anything. Quote Link to comment Share on other sites More sharing options...
jcbones Posted May 26, 2015 Share Posted May 26, 2015 Perhaps start with mcrypt_encrypt and mcrypt_decrypt. Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 26, 2015 Share Posted May 26, 2015 You could also encrypt within the database as opposed to doing it with PHP: https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html There are advantages and disadvanteges to both Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.