Need to encrypt form results in Database
I have an external form that I need to store in a secondary DB/table encrypted. I have the form submitting successfully to the DB/table.
However, I need to encrypt the data in the Database. Can someone help out here? The data from this table is pulled into an API call and sent to an internal server at the client where it needs to be decrypted and imported into their CRM system. They handle that part. All I need is to encrypt the Data and tell them how to decrypt.
I am using C5 8.5.1 and PHP 7.1
Thanks in advance!
use Defuse\Crypto\Crypto; // To encrypt $encryptedText = Crypto::encryptWithPassword($plaintext, $password); // To decrypt $decryptedText = Crypto::decryptWithPassword($encryptedText , $password);
If your client is also using C5 they can use that code directly. Otherwise, they can download the library from Github and install it on their server. The link is:https://github.com/defuse/php-encryption...
I have one form POST that I need to do this to from an External Form.
Someone stealing the disk won't be able to read it. But anyone with a server login will be able to read it.
You can also encrypt tables within MySQL.https://dev.mysql.com/doc/refman/5.7/en/faqs-tablespace-encryption.h...
With table encryption, the table will only be readable through MySQL. Anyone with a login who doesn't have access to the MySQL database table won't be able to read it.
I think you may also be able to specify just columns to be stored encrypted.