PHP code example of nickcv / yii2-encrypter

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

    

nickcv / yii2-encrypter example snippets


php composer.phar 
web.php
web.php

return [
    'class'=>'\nickcv\encrypter\components\Encrypter',
    'globalPassword'=>'YourPassword',
    'iv'=>'YourIV',
    'useBase64Encoding'=>true,
    'use256BitesEncoding'=>false,
];
console.php
encrypter.php
web.php

'encrypter' => 

public function behaviors()
{
    return [
        'encryption' => [
            'class' => '\nickcv\encrypter\behaviors\EncryptionBehavior',
            'attributes' => [
                'attributeName',
                'otherAttributeName',
            ],
        ],
    ];
}