tmgc-components
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

前端js 组件&插件

secret

---接口加密解密算法

使用方法:

import { secret } from "tmgc-components";

// 需要加密的数据
const data = {a: 1, b: 2};

// 秘钥
const key = '1234567890123456';

// 偏移量
const iv = '1234567890123456';

// 加密方法
// JSON.stringify => aes加密
secret.encryption(config.data, key, iv)

// 解密方法
// base64解密 => aes解密 => JSON.parse
secret.decryption(res.data, key, iv)

Readme

Keywords

none

Package Sidebar

Install

npm i tmgc-components

Weekly Downloads

0

Version

1.0.9

License

ISC

Unpacked Size

2.22 kB

Total Files

5

Last publish

Collaborators

  • zhouxuanyunpm
  • zxchen_