caster001 Posted November 24, 2006 Share Posted November 24, 2006 Hi Everyone...PHP encryption *breathes* in a nut shell..is there any easy way to encrypt data to a database, then later check a user input against it?Because I'm looking at the crypt() thing, but apparently..it's a one way encryption..but on that IBM site...I'm not sure how many of you have seenit http://www-128.ibm.com/developerworks/library/os-php-encrypt/index.html well under listing.6 it says you can just simply run the sameencryption method (in this case md5) against it and you can decrypt or compare by doing that...Well that didn't work for me...Any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/28351-php-encryption/ Share on other sites More sharing options...
fert Posted November 24, 2006 Share Posted November 24, 2006 you could use XOR encryption. Quote Link to comment https://forums.phpfreaks.com/topic/28351-php-encryption/#findComment-129715 Share on other sites More sharing options...
Ninjakreborn Posted November 24, 2006 Share Posted November 24, 2006 I tried encryption for almost 2 months, I like the mcrypt library, but it takes months, and months to really leard.Just run it through an md5($variable)then when you check it check it like this// first when you store the datalike a password// store data$password = mysql_real_escape_string(md5($_POST['password']));// later on retrieval$password = "whatever"; // this would be the user inputted passwordif (md5($password) == $storedpassword ) {echo "login correct";} Quote Link to comment https://forums.phpfreaks.com/topic/28351-php-encryption/#findComment-129724 Share on other sites More sharing options...
caster001 Posted November 25, 2006 Author Share Posted November 25, 2006 running it through an md5 variable...would that still be a secure method though? Quote Link to comment https://forums.phpfreaks.com/topic/28351-php-encryption/#findComment-129904 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.