v.1.0.0. initial push of license-lib
This commit is contained in:
8
server/utils/crypto.js
Normal file
8
server/utils/crypto.js
Normal file
@ -0,0 +1,8 @@
|
||||
// server/utils/crypto.js
|
||||
const jwt = require('jsonwebtoken');
|
||||
const config = require('../config');
|
||||
|
||||
const encrypt = (data) => jwt.sign(data, config.JWT_SECRET);
|
||||
const decrypt = (token) => jwt.verify(token, config.JWT_SECRET);
|
||||
|
||||
module.exports = { encrypt, decrypt };
|
Reference in New Issue
Block a user