Skip to content

Extension for yii2 encryption algorithm "XXTEA"

Notifications You must be signed in to change notification settings

cybercog/yii2-xxtea

 
 

Repository files navigation

Extension for yii2 encryption algorithm "XXTEA"

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);

About

Extension for yii2 encryption algorithm "XXTEA"

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • PHP 100.0%