jd2007 Posted November 2, 2007 Share Posted November 2, 2007 What function do i use for data encyrption and decryption ? Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/ 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 Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383270 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. Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383273 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. Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383278 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 Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383280 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. Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383301 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). Link to comment https://forums.phpfreaks.com/topic/75734-what-function-do-i-use-for-data-encyrption-and-decryption/#findComment-383316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.