1. Go to this page and download the library: Download dovechen/yii2-aes 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/ */
dovechen / yii2-aes example snippets
'components' => [
...
'aes' => [
'class' => 'dovechen\yii2\aes\Aes',
'key' => 'Y34lM1IyOSUTEa5h', // The encrypt & decrypt key.
'iv' => 'jKWFi17PZhpy08In', // A non-NULL Initialization Vector, default: 397e2eb61307109f.
]
...
]
// Global Use
$aesMcrypt = Yii::$app->aes;
// More Use
$aesMcrypt = Yii::createObject([
'class' => 'dovechen\yii2\aes\Aes',
'key' => 'Y34lM1IyOSUTEa5h', // The encrypt & decrypt key.
'iv' => 'jKWFi17PZhpy08In', // A non-NULL Initialization Vector, default: 397e2eb61307109f.
]);