[PHP] Decrypt Function?
Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have?
RE: [PHP] Decrypt Function?
Unix "Crypt" function is a one way encrypytion algorithm therefore you can not technically decrupted as such. The way that you can check to see if the given uncrypted value is equals to its crypted value is to 1) Crypt the string with the same "salt" 2) Compare this with the crypted version If these 2 are the same then you assume that the 2 strings are equal. If you really want to "decrypt" the string i.e. turn the encrypted version into its original readable text then you'll have to use Mcrypt() functions in PHP instead (if you have PHP 4 and above ). There are also other Encrytion functions available, check in the manual: http://www.php.net/manual/en/ref.mcrypt.php -Original Message- From: Chris Anderson [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 24, 2001 8:44 AM To: PHP Subject: [PHP] Decrypt Function? Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Decrypt Function?
Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? Crypt cannot be decrypted. One use of the function is for storing passwords on a server where people can access them. If you crypt the passwords before you store them on the server, nobody can see the actual passwords. Now when someone tries to login with one of those passwords, you crypt the password he enters, compare it with the version on the server, and if they match, it's the right password. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Decrypt Function?
Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? Encrypt data! ;) crypt is a one-way finction, it produces a hash from some plain text, and its result is suitable to store sensitive data in database, like passwords... If you want to store information that you want to get back to the initial state (plain text) you should not use crypt() or md5()... If you only want to store encrypted passwords crypt is enought.. When you want to confirm that a inputed text is equals to the stored and encrypted password, you just have to encrypt the inputed text and compare it with the previously stored password... Valter Santos WEB/WAP Consultant Email : [EMAIL PROTECTED] Mobile: +351 93 9650075 WeDo Consulting - http://www.wedo.pt -Original Message- From: Chris Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 10:44 PM To: PHP Subject: [PHP] Decrypt Function? Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Decrypt Function?
A, I see. Thank youthat is actually a great idea. Why didn't I think of that? /me hits himself in the head - Original Message - From: "Opec Kemp ( Ozemail )" [EMAIL PROTECTED] To: "PHP List" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, March 25, 2001 6:57 PM Subject: RE: [PHP] Decrypt Function? Unix "Crypt" function is a one way encrypytion algorithm therefore you can not technically decrupted as such. The way that you can check to see if the given uncrypted value is equals to its crypted value is to 1) Crypt the string with the same "salt" 2) Compare this with the crypted version If these 2 are the same then you assume that the 2 strings are equal. If you really want to "decrypt" the string i.e. turn the encrypted version into its original readable text then you'll have to use Mcrypt() functions in PHP instead (if you have PHP 4 and above ). There are also other Encrytion functions available, check in the manual: http://www.php.net/manual/en/ref.mcrypt.php -Original Message- From: Chris Anderson [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 24, 2001 8:44 AM To: PHP Subject: [PHP] Decrypt Function? Is there any way to decrypt dat encrypted using the crypt function? If not, then what purpose does that function have? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]