emsjs1
10-10-2009, 12:19 AM
I am looking (free or paid) for an encryptor and decryptor that i can use in my php program. Basically i want to encrypt the cpanel server remote access key before storing to database and then decrypt it so i can use cPanel API.
Is there a good encryptor and decryptor i can use for this purpose?
01globalnet
10-10-2009, 03:25 AM
You can have a look at PEAR Crypt packages.
http://pear.php.net/search.php?q=crypt&in=packages&x=0&y=0&p=1
rhosternet
10-10-2009, 04:52 AM
Iа your php have Mcrypt module installed, you can use its functions. It supports more then 10 crypt algorithms. Also it's standard module, therefore it's well documented in php manual.
fabin
10-10-2009, 03:46 PM
may be, its better to write something your own and ioncube it
foobic
10-10-2009, 09:40 PM
Basically i want to encrypt the cpanel server remote access key before storing to database and then decrypt it so i can use cPanel API.So that if someone happens to be able to read your database but not your PHP scripts you'll be safe? What are the chances? Encryption in the database is pretty much useless if your PHP scripts have the means to decrypt automatically.
As fabin suggested, your best bet would be to put the key into your script and encrypt the lot with ioncube. Still not unbreakable but better than anything else available.
emsjs1
10-10-2009, 10:43 PM
may be, its better to write something your own and ioncube it
fabin and foobic, Sorry if you misunderstood my post. I was asking for an encrytor and decryptor for mysql so that the server access hash key will not be easily seen. It's like encrypting passwords but I cant use md5 because I need to decrypt it.
For PHP source code encryptor and decryptor, that is not a problem. Sourceguardian is available for free. My problem is how to encrypt and decrypt data in mysql database
fabin and foobic, Sorry if you misunderstood my post. I was asking for an encrytor and decryptor for mysql so that the server access hash key will not be easily seen. It's like encrypting passwords but I cant use md5 because I need to decrypt it.
For PHP source code encryptor and decryptor, that is not a problem. Sourceguardian is available for free. My problem is how to encrypt and decrypt data in mysql database
If you want to protect the connection password, you must encode the scripts too because it'll be obvious how to restore the password. As for SG, it's not available for free legally unless you already own a legitimate license.
If you also want to protect the data in the database properly then you might consider using encrypted file systems as well as protection to the code that reads and writes data to the database. Also be aware of the fundamental limitations to what is possible with all the PHP libraries being opensource.