Page 1 of 1
Encrypt a number?
Posted: Wed Oct 16, 2002 10:17 am
by mettlehead
Hi,
I have a number like a 16 digit credit card #. I'd like to run some simple (very simple) math algorythm on it to scramble it up, then I need to be able to de scramble it to get the info I need. Hope that makes sense. Any ideas?
Posted: Wed Oct 16, 2002 10:08 pm
by SuperHuman
Ok, if it is a credit card and you are recieving the number over the web, you are using SSL, correct? If not, you will be in a heap of trouble if the number gets hijacked between the transfer of data...
Now, most PHP host's that provide SSL also have the openssl library compiled in with PHP. So, check out the openssl functions in the manual at php.net as they provide some encryption/decription functions.
If your host does'nt have openssl compiled, your next option would be to use the mcrypt library if it is available or write your own 2-way encryption algorithm...
Posted: Thu Oct 17, 2002 1:37 am
by volka
http://www.hotscripts.com has i.e. a link to
CryptoMAK.
Note: this is no strong cryptography but it only uses core-php