Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cute-angelia/mali-secure-ts
https://github.com/cute-angelia/mali-secure-ts
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cute-angelia/mali-secure-ts
- Owner: cute-angelia
- Created: 2020-10-14T03:13:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-21T06:18:37.000Z (about 2 months ago)
- Last Synced: 2024-12-22T06:14:52.553Z (18 days ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/mali-secure-ts
- Size: 191 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## mali-secure-ts
1. url签名(like:微信支付)
2. 解密数据
## install
`npm i mali-secure-ts --save-dev`
## usage
```
// 导入方式
import {Secure} from "mali-secure-ts";// 初始化实例
// appid 应用id
// secret 秘钥
// version 版本号 1.0.1
// device 设备信息 ios_14.0.1
// platform 平台: app,wechat,h5
let s = new Secure.Secure('appid', '192006250b4c09247ec02edce69f6a2d', "1.0.3", "ios_14.2.3")// 获得签名后的 url
let uri1 = s.SignUrl('https://mp.weixin.qq.com/wxamp/devprofile/get_profile?token=1515154505&lang=zh_CN',2)console.log(uri1)
// https://mp.weixin.qq.com/wxamp/devprofile/get_profile?appid=appid&cid=cid1&lang=zh_CN&nonce_str=235nzeTP&nonce_time=1592213055&token=1515154505&sign=1deda92a05c849a17d4a0b0c3259f8fe// 解密功能
console.log(s.DecryptCrypto2(inputText, key))```
## publish
```
npm run buildnpm run publish
```