Link to home
Start Free TrialLog in
Avatar of Mamady
MamadyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

two way encryption in PHP?

can someone tell me if PHP has any two-way encryption functions? I dont wish to use libraries like mcrypt... just functions which are available in PHP. Also, i need it to be at least 128bit, as it will be used to encrypt credit card details.

I dont want to use any external classes developed by other people.

If there are any tutorials on the web which show how to do 128bit encryption with php, i would be grateful for links.
Avatar of VGR
VGR

XOR
extended MD
Hashes
double-DES
I found this very handy the other day. Has little to do with your question, but still very useful.

http://www.sitepoint.com/article/728

I've always used crypt() unfortunately it is One-way string encryption
Avatar of Mamady

ASKER

thanks... but i have already implemented my own credit card verification system. Also, i always use md5 myself, but im really in need of a 2 way encryption method now. Im using mcrypt right now, but i need to move away from this urgently because i need it to run on a server where mcrypt is not installed. (i dont have access to the server, so i cant recompile php, or ask that php be recompiled to include the mcrypt library)
ASKER CERTIFIED SOLUTION
Avatar of Kriek
Kriek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think you should look into SSL. You need to get a licence and install it. Ask your host about adding this in, or alternatively go with a third party company that processes your cedit cards for you, such as Worldpay.
Avatar of Mamady

ASKER

ssl encrypts information being sent from the browser to the server... once it reaches the server, the information is no longer encrypted.

I already have an ssl cert. for the domain.