Page 1 of 1
Encrypt/Decrypt Data using php
Posted: Sun Aug 24, 2008 9:10 pm
by coder500
Is there any way to encrypt information like email id,names, and payment information entered by the visitors and store them into database?
I want a method to download the data also?
Is it possible?
Any suggestions/help?
Re: Encrypt/Decrypt Data using php
Posted: Mon Aug 25, 2008 2:38 am
by jaoudestudios
Encryption is a huge topic!
To encrypt id, email, password etc is one thing but to encrypt payment details is another.
If you are just starting to use encryption I would not store payment details. Use paypal or something, where it takes care of payment details for you!
There are many times of encryption methods and payment details requires the latest one with the highest encryption and payment details should be stored in a different database to the rest of the information on another server with SSL between the two and SSL for the website. Trust me leave payment details to another company that specialise in this otherwise you make get yourself into a lot of trouble if you loose this information.
Re: Encrypt/Decrypt Data using php
Posted: Mon Aug 25, 2008 2:50 am
by Apollo
You can encrypt and decrypt with PHP's
mcrypt_encrypt and
mcrypt_decrypt functions. If you only intend to store encrypted stuff in a database, you can also use MySQL's
AES_ENCRYPT function.
But like jaoudestudios says: if you're new to this, better don't store any payment information (as in credit card numbers 'n stuff) at all.
Re: Encrypt/Decrypt Data using php
Posted: Mon Aug 25, 2008 9:12 am
by coder500
Thanks for the reply.