1.0.0 • Published 1 year ago
lite-ts-jwt v1.0.0
安装
npm install lite-ts-jwt
使用
import { JwtCrypto } from 'lite-ts-jwt';
const jwt = new JwtCrypto('xxx');
const token = await jwt.encrypt(JSON.stringify({a:'b'}));
// token = 'xxxx-xxx.xxx'
const data = await jwt.decrypt(token);
// data = "{'a':'b'}";
1.0.0
1 year ago