[TOC]
### 組件說明
> Lying的encrypter是內置組件,用于基礎的數據加密。
### 配置選項
| 配置名 | 參數類型 | 可選 | 默認值 | 說明 |
| --- | --- | --- | --- | --- |
| class | string | 是 | lying\service\Encrypter | 不可更改 |
### 示例配置
Encrypter組件暫時不需要配置,可直接使用
### 調用方式
~~~php
\Lying::$maker->get('encrypter');
\Lying::$maker->encrypter();
\Lying::$maker->encrypter;
~~~
### 方法列表
~~~php
/**
* 位或加密
* @param mixed $data 要加密的數據
* @param string $key 密鑰
* @param int $expire 過期時間戳
* @return string 返回密文
*/
public function xorEncrypt($data, $key, $expire = 0);
~~~
* * * * *
~~~php
/**
* 位或解密
* @param string $data 密文字符串
* @param string $key 密鑰
* @return bool|mixed 返回解密后的數據,失敗返回false
*/
public function xorDecrypt($data, $key);
~~~
- 序言
- 更新日志
- 安裝
- 規范
- 常量
- 配置
- 自動加載
- MVC
- 模塊
- 控制器
- 模型
- 視圖
- php原生模板
- 模板引擎
- 變量輸出
- 模板注釋
- 模板繼承
- 模板引用
- 流程控制
- 原樣輸出
- 服務組件
- Hook組件
- Request組件
- Router組件
- Cookie組件
- Encrypter組件
- Dispatch組件
- Response組件
- View組件
- Session組件
- Helper組件
- 數據分頁
- 數據驗證
- Logger組件
- Cache組件
- Redis組件
- Connection組件
- 執行sql語句
- 查詢生成器
- 查詢方法詳解
- Schema
- Captcha組件
- CLI
- CLI工具
- 事件
- 類事件
- 實例事件
- 全局事件
- 助手函數
- 擴展
- 異常
- 部署
- Apache
- Nginx
- IIS
- 虛擬主機