egg-rsa

1.0.0 • Public • Published

egg-rsa

NPM version build status Test coverage David deps Known Vulnerabilities npm download

使用 rsa 加密, 请求数据,以及加密输出数据

配置方式

{
  ignorePaths: [ '/' ], // 忽略请求路径, 支持正则
  ignore: () => true, // (ctx) => true 忽略请求方式
  rsaPrivateKey: '', // 秘钥文本
  rsaPublicKey: '', // 公钥文本
  outEncoding: 'base64', // 输出编码
  bufEncoding: 'utf8', // buffer 编码
  ignoreExport: () => false, // (ctx) => false 忽略输出请求方式
}

Install

$ npm i egg-rsa --save

Usage

// {app_root}/config/plugin.js
exports.rsa = {
  enable: true,
  package: 'egg-rsa',
};

Configuration

// {app_root}/config/config.default.js
exports.rsa = {
};

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i egg-rsa

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

11 kB

Total Files

9

Last publish

Collaborators

  • theone1006