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?
Encrypt a number?
Moderator: General Moderators
-
mettlehead
- Forum Newbie
- Posts: 15
- Joined: Fri Oct 11, 2002 11:03 am
- Location: Canada
-
SuperHuman
- Forum Newbie
- Posts: 10
- Joined: Wed Oct 16, 2002 10:00 pm
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...
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...
http://www.hotscripts.com has i.e. a link to CryptoMAK.
Note: this is no strong cryptography but it only uses core-php
Note: this is no strong cryptography but it only uses core-php