I need a program/script for php to encrypt/decrypt data without the need of
any special add-on to php.
cryption
Have a look at this,
Tim specified the need to be able to encrypt and decrypt data. crypt() is a one-way function - no decrypt available. Sure, you can compare crypt()ed strings but you can't get your starting value back.
http://www.php.net/manual/en/function.mcrypt-encrypt.php
http://www.php.net/manual/en/function.mcrypt-decrypt.php
Might be a bit better suited to the task.
ok this is the type of cyrption i want but this requires a module to be installed with php, does anyone have a homemade function to do this?
There is an example on this site, in the Algorithm section of the code libary.
Just out of interest, what are you trying to do ?
If you want to transfer information securly then this is not the way to do it, as the data is transmited from a browser is not encrypted, and will only be encyypted on the server.
If you are just trying to store encrypted data, then this is fine.
Anand
i am making a commercial forum script (free of course) using only text files and i needed someway of 2-way cyrption to store passwords, i need the de-cyrpt for if a user forgets a password then they can retrive it.
do u understand?
can u give me direct link to that code in the code library?