rmrevin / yii2-xxtea
Extension for yii2 encryption algorithm XXTEA
Installs: 275
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-18 15:29:17 UTC
README
Installation
In composer.json
:
{
"require": {
"rmrevin/yii2-xxtea": "1.2.0"
}
}
configuration
/protected/config/main.php
<? return array( // ... 'components' => array( // ... 'xxtea' => array( 'class' => 'rmrevin\yii\xxtea\Component', 'key' => 'qwertyuiopasdfgh', // 16 letters 'base64_encode' => true, ), ), // ... );
Usage
<? // ... $XXTEA = \Yii::$app->get('xxtea'); $hash = $XXTEA->encrypt('data to encrypting'); $data = $XXTEA->decrypt($hash);