PHP code example of shakib / cakephp-encrypt-decrypt
1. Go to this page and download the library: Download shakib/cakephp-encrypt-decrypt library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php
public function encryptDecryptAllData()
{
// columns that are in plain text
$sourceColumns = ['column1', 'column2'];
// columns that need to be encrypted / decrypted
$destinationColumns = ['column3', 'column4'];
return $this->encryptAll($this, $sourceColumns, $destinationColumns);
}