NYCPHP Meetup

NYPHP.org

[nycphp-talk] Encrypting/Decrypting data w/php

Ben Sgro ben at projectskyline.com
Mon Dec 10 11:06:59 EST 2007


Hello All,

I'm going to be storing some simple data in an xml file.

The data will have information for session, including username/passwords.

I want to encrypt the username & password associated w/the session.

What's the easiest method/functions to do this? I've only done md5 and 
matched
the input against the stored string.

The program would:
1) Prompt the user for the password when starting. This is the password 
used to decrypt all sessions,
and has nothing to do w/the stored/encrypted password.
2) Decrypt the session data in the xml files
3) Store the decrypted session data in memory.
4) Only if the user changes the session username/password would I write 
to the file (the encrypted) version.


Thanks,

- Ben



More information about the talk mailing list