Download the PHP package mrmiao/think-interface-encryption without Composer
On this page you can find all versions of the php package mrmiao/think-interface-encryption. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mrmiao/think-interface-encryption
More information about mrmiao/think-interface-encryption
Files in mrmiao/think-interface-encryption
Download mrmiao/think-interface-encryption
More information about mrmiao/think-interface-encryption
Files in mrmiao/think-interface-encryption
Vendor mrmiao
Package think-interface-encryption
Short Description Base on TP framework encrypt the JSON-type interface request and return data by using the RSA algorithm
License
Package think-interface-encryption
Short Description Base on TP framework encrypt the JSON-type interface request and return data by using the RSA algorithm
License
Please rate this library. Is it a good library?
Informations about the package think-interface-encryption
think-interface-encryption
Encrypt the JSON-type interface request and return data by using the RSA
这个扩展包深度依赖TP5框架
- 使用到大量的tp框架下的帮助函数
- 加密类依赖了框架的配置文件的自动加载模式
- 加密类配置文件生成依赖了框架的命令行方式
预定义了异常 code
- 100 缺少配置文件
- 101 请求参数解析失败
- 102 请求方式错误
- 103 请求参数数量与规则不符
- 104 错误的请求参数
请求参数支持严格规则
- $rule 严格设定的参数规则,['参数名'=>'参数类型']
- 参数类型包括,会强制转换类型
- array 数组
- int 整数
- float 浮点数
- boolean 布尔值
- string 字串
注意
- 配置文件rsa_config.php位于 application/extra目录下
- debug设置,本地开发环境中设为 true,调试模式; 线上环境中设为 false,接口模式;
- 在接口模式下,请求强制要求为json类型
- 在接口模式下,请求数据统一强制使用$_REQUEST['param']来获取(既app端统一请求param来放置请求密文数据)
命令行生成配置文件
- 在项目目录下使用命令行命令 php think MakeRSAConfig
对接app
- 需要提供给APP端rsa_config配置文件里的 request_pubKey 和 response_privKey
如何设置明文请求调试
- 在rsa_config_path文件中将debug设置为true
调用示例
All versions of think-interface-encryption with dependencies
PHP Build Version
Package Version
Requires
ext-openssl Version
*
The package mrmiao/think-interface-encryption contains the following files
Loading the files please wait ....