# ms.cryption

> ey ms encryption and decryption

Latest version **1.1.0** (published 2022-09-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install ms.cryption
pnpm add ms.cryption
yarn add ms.cryption
bun add ms.cryption
```

## 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 | 1.1.0 |
| Published | 2022-09-09 |
| First published | 2022-08-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | Free |
| Maintainers | free-qi |

## Links

- npm: https://www.npmjs.com/package/ms.cryption
- npm.io page: https://npm.io/package/ms.cryption

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.88.2
- [crypto-js](https://npm.io/package/crypto-js.md) ^3.1.9-1
- [@types/request](https://npm.io/package/@types/request.md) ^2.48.8
- [@types/crypto-js](https://npm.io/package/@types/crypto-js.md) ^4.1.1

## Recent versions

- 1.1.0 (latest) — 2022-09-09
- 1.0.8 — 2022-09-06
- 1.0.7 — 2022-09-01
- 1.0.6 — 2022-09-01
- 1.0.5 — 2022-09-01
- 1.0.4 — 2022-08-31
- 1.0.3 — 2022-08-31
- 1.0.2 — 2022-08-31
- 1.0.1 — 2022-08-31
- 1.0.0 — 2022-08-30

## README

# MicroService Cryption

The encryption and decryption service for Node.js exposure of GDS Digital Microservice Team
## Install
```
npm install ms.cryption
```

## Usage


```javascript
// 引用已经下载的包
const { Microsoft } = require("ms.cryption");

/**
 * 实例化对象
 * params：string 调用digital微服务的服务地址
*/
let microsoft = new Microsoft(
  "https://china-assurance-microservice.xxxx.net:xxxx"
);

// 自己生成的UUID
let keyCore = "f70ad85d-872e-4dcd-a92b-0347ae67e9f4";

/**
 * 调用加密服务
 * param1: string 待加密字符
 * param2: string 自己生成的UUID
*/
microsoft.encryption("这是一个需要加密的字符串", keyCore).then((enRes) => {
    // enRes 即使加密后的返回结果
});

/**
 * 调用解密服务
 * param1: string 待解密字符
 * param2: string 自己生成的UUID （要与加密时相同）
*/
microsoft.decrypt(res, keyCore).then((deRes) => {
    // deRes 解密后的得道的结果
});

/**
 * 调用解密服务
 * param1: string 待解密Base64
 * param2: string 自己生成的UUID （要与加密时相同）
*/
microsoft.decryptFile(res, keyCore).then((fileRes) => {
    // fileRes 解密后的得道的结果
});

```

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