jd2007 Posted November 2, 2007 Share Posted November 2, 2007 What function do i use for data encyrption and decryption ? Quote Link to comment Share on other sites More sharing options...
atlanta Posted November 2, 2007 Share Posted November 2, 2007 md5 http://us2.php.net/md5 or sha1 http://us2.php.net/manual/en/function.sha1.php Quote Link to comment Share on other sites More sharing options...
peranha Posted November 2, 2007 Share Posted November 2, 2007 md5 and sha1 are 1 way encryption, and cannot be decrypted. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 2, 2007 Share Posted November 2, 2007 There isn't one unless you write your own algorthims, This is mainly for security reasons as developing a public 2-way encrypt would be pointless. Quote Link to comment Share on other sites More sharing options...
toplay Posted November 2, 2007 Share Posted November 2, 2007 There isn't one unless you write your own algorthims, This is mainly for security reasons as developing a public 2-way encrypt would be pointless. There is an extension/module to help with encrypting AND decrypting data. Look into: http://us2.php.net/manual/en/ref.mcrypt.php Tutorial: http://www.phpfreaks.com/tutorials/128/0.php Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 2, 2007 Share Posted November 2, 2007 There is an extension/module to help with encrypting AND decrypting data. Look into: The quality of this is relatively low, since any one who could "hack" into your mysql db and read the table data could easily decrypt it with mcrypt. The idea of 2-way encryption just doesn't make sense to me, you encrypt to protect something, not to do magic tricks with it. Quote Link to comment Share on other sites More sharing options...
toplay Posted November 2, 2007 Share Posted November 2, 2007 The quality of this is relatively low, since any one who could "hack" into your mysql db and read the table data could easily decrypt it with mcrypt. The idea of 2-way encryption just doesn't make sense to me, you encrypt to protect something, not to do magic tricks with it. I disagree. Someone who could hack to get to your database does not necessarily mean that they have the ability to decrypt the data. They would have to know which one out of the many ciphers (which some use 256 bit encryption) you used, then cipher mode you used, the initialization vector you used, and your private key/password you used. Granted that these might be available if your not (zend) encoding your scripts or not hiding your key properly. There are many reasons why you have to have 2-way encryption (i.e. credit card billing). 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.