authcode
Version:
discuz authcode function for nodejs
27 lines (20 loc) • 498 B
Markdown
authcode
========
这是一个discuz authcode函数的NodeJS实现
## 安装
```
npm install authcode
```
## 使用说明
```js
var auth = require('authcode');
/**
* authcode
* @param str 需要加密/解密的字符串
* @param operation 加密['ENCODE']/解密['DECODE']
* @param key 加密密钥
* @param expiry 过期时间(0为不过期,默认为0)
* @return 加密过的字符串
*/
auth(string,operation,key,expiry);
```