https://github.com/airdwing/js-airx-authcode
Authcode 加密封装 for Javscript
https://github.com/airdwing/js-airx-authcode
airx authcode browser es6 js node
Last synced: 11 months ago
JSON representation
Authcode 加密封装 for Javscript
- Host: GitHub
- URL: https://github.com/airdwing/js-airx-authcode
- Owner: AirDwing
- Created: 2017-05-26T01:35:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T03:44:20.000Z (over 4 years ago)
- Last Synced: 2025-03-25T12:51:21.525Z (11 months ago)
- Topics: airx, authcode, browser, es6, js, node
- Language: JavaScript
- Homepage: https://npmjs.org/package/@airx/authcode
- Size: 82 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @airx/authcode
[](https://npmjs.org/package/@airx/authcode) [](https://npmjs.org/package/@airx/authcode)
[](https://npmjs.org/package/@airx/authcode)
## Examples
Node.js
### ENCODE
```js
const {encode} = require('@airx/authcode');
encode('test','key')
// 1df4l6f9CFjMtkqRCi8IHj4hB/0c/HjyEWs0ZweV6jrB
encode('test','key',300)
// 33db1iVqMQUWBO7Tp44qKK+Dtl6cbBG9hNwYP1BKF5U6
```
### DECODE
```js
const {decode} = require('@airx/authcode');
decode('1df4l6f9CFjMtkqRCi8IHj4hB/0c/HjyEWs0ZweV6jrB','key')
// test
```
浏览器:
引用
```html
```
```js
authcode.encode('test','key')
// 1df4l6f9CFjMtkqRCi8IHj4hB/0c/HjyEWs0ZweV6jrB
authcode.decode('1df4l6f9CFjMtkqRCi8IHj4hB/0c/HjyEWs0ZweV6jrB','key')
// test
```
## License
MIT
通过支付宝捐赠:
