# kepler-encryption-agreement

> 开普勒系列产品的加密插件

Latest version **2.0.0** (published 2022-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install kepler-encryption-agreement
pnpm add kepler-encryption-agreement
yarn add kepler-encryption-agreement
bun add kepler-encryption-agreement
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-05-18 |
| First published | 2020-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zhangyida |
| Maintainers | zhangyida_1990 |
| Keywords | webpack, ts, crypto, md5, jsencrypt |

## Links

- npm: https://www.npmjs.com/package/kepler-encryption-agreement
- npm.io page: https://npm.io/package/kepler-encryption-agreement

## Dependencies (6)

- [webpack](https://npm.io/package/webpack.md) 4.44.2
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.0.0
- [jsencrypt](https://npm.io/package/jsencrypt.md) ^3.0.0-rc.1
- [typescript](https://npm.io/package/typescript.md) ^4.6.4
- [@types/node](https://npm.io/package/@types/node.md) ^12.12.55
- [@types/crypto-js](https://npm.io/package/@types/crypto-js.md) ^3.1.45

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-05-18
- 1.1.8 — 2020-09-11
- 1.1.7 — 2020-09-11
- 1.1.6 — 2020-09-11
- 1.1.5 — 2020-09-11
- 1.1.4 — 2020-09-11
- 1.1.3 — 2020-09-11
- 1.1.2 — 2020-09-11
- 1.1.1 — 2020-09-11
- 1.1.0 — 2020-09-11
- 1.0.9 — 2020-09-11
- 1.0.8 — 2020-09-10
- 1.0.7 — 2020-09-10
- 1.0.6 — 2020-09-10
- 1.0.5 — 2020-09-10
- … 4 more at https://npm.io/package/kepler-encryption-agreement/versions

## README

# kepler-encryption-agreement

#### 介绍
为开普勒系统提供前后台协议加密服务

#### 软件架构
软件架构说明-原始开发


#### 安装教程

1.  npm i kepler-encryption-agreement

#### 使用说明

1.  该库主要提供两个方法 getAuthToken（对x-token进行加密操作） encryption（对post请求的参数进行加密）

```
// 传入参数说明
interface OPtion {
	PUBLICKEY: string; // 公钥由后端提供
	KEY: string; // 需要的key后端提供
	CHANNEL: string; // 频道 后端定义 bp|admin|app
	RANDOM: string; // 16的随机数
	PARAMS: string; // 加密参数
	DEUBG: boolean; // 是否开启debug模式
}

// 参数 例子
const options = {
	PUBLICKEY:'afssklfjlsjlkjsakflsd',
	KEY:'123456',
	CHANNEL:'bp',
	RANDOM:'123456789123457',
	PARAMS:'{page:1,size:10}',
	DEUBG:true
}
// （生成加密后的X-Auth-Token）
new EncryptionAgr(options).getAuthToken();
// （对post参数进行加密操作）
new EncryptionAgr(options).encryption();
```


#### 参与贡献

1. 邮箱：654805028@qq.com
2. nickname: zhangyida
3. 技术博客地址：https://www.jianshu.com/u/d13b89197264
4. github: https://github.com/zhangYiDa123

#### 更新日志

1 v1.1.7 -> v1.1.8版本 1 增加debug配置 是否开启debug模式

---
_Source: https://npm.io/package/kepler-encryption-agreement · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
