public function __construct()
{
if (!file_exists(TL_ROOT . '/system/modules/phpseclib/Crypt/AES.php'))
{
throw new Exception("Missing AES plugin in '/system/modules/phpseclib/Crypt/AES.php'");
}
else
{
include_once(TL_ROOT . '/system/modules/phpseclib/Crypt/AES.php');
}
}
public function Encrypt($text,$strKey)
{
$this->objAES = new \Crypt_AES();
$this->objAES->setKey($strKey);
return $this->objAES->encrypt($text);
}
public function Decrypt($text,$strKey)
{
$this->objAES = new \Crypt_AES();
$this->objAES->setKey($this->strKey);
return $this->objAES->decrypt($text);
}
sample...