1.0.9 • Published 3 years ago

tmgc-components v1.0.9

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

前端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)
1.0.9

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago