PHP code example of maxcrossan / yii_encryption

1. Go to this page and download the library: Download maxcrossan/yii_encryption 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/ */

    

maxcrossan / yii_encryption example snippets


    'components'=>array(
        'securityManager'=>array(
            'cryptAlgorithm' => 'rijndael-128',
            'encryptionKey' => 'your-encryption-key'
        )
    )

    public function behaviors(){
        return array(
            'EncryptionBehaviour'=>array(
                'class'=>'application.vendor.maxcrossan.yii_encryption.src.EncryptionBehaviour',
                //Add the fields you wish to encrypt below
                'encryptedFields'=>array(
                    'addressLine1',
                    'addressLine2',
                    'lastName',
                    'city',
                    'postcode',
                    'emailAddress',
                    'phone'
                )
            )
        )
    }