Maths not working.. or is it me?
| From: | Tristan dot Pretty at risk dot sungard dot com | Date: | Thu, 15 Apr 2004 09:59:14 +0000 |
| Subject: | Maths not working.. or is it me? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-183429@lists.php.net to get a copy of this message | ||
Im trying to implement some really simply credit card encryption...
I know it's not perfect, but it's a stop gap measure until I do this
properly... however...
To Encrypt before I put into my DB, I'm using this formula...
$encrypt = $CardNumber / ($ExpiryYear * 41.9);
(41.9 is just a random No to help encrpt the data)
To see the correct credit card No later, I'm using this formula:
$decrypt = $row[encryptedno] * $row[expiryyear] * 41.9;
The credit car No I'm testing with is:
1234123412341234
and the Exp year is 2008
However, I keep getting this result...
1.2341234123412E+15
What on earth am I doing wrong?
*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************