Forum Moderators: coopster

Message Too Old, No Replies

php crypt help

         

music_man

3:26 am on Jan 9, 2006 (gmt 0)

10+ Year Member



Hi

I am trying to store an email variable in an encrypted format using crypt and then be able to view it decrypted in the administration. I presume that the decryption method used to view the email it can be applied across other functions.

[edited by: coopster at 3:33 pm (utc) on Jan. 9, 2006]
[edit reason] Charter [webmasterworld.com] [/edit]

coopster

3:37 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



crypt() [php.net] is a one-way string encryption so you aren't going to be able to see the original value once it has been run through this function. There is no "decrypt" function. If you truly need an administrator to be able to see the value "decrypted" then you have to store the value in it's original format, no encryption.

whoisgregg

11:36 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In order to encrypt and decrypt, you'll need the Mcrypt Encryption Functions [php.net].