v.1.0.0. initial push of license-lib

This commit is contained in:
2025-03-19 09:37:30 -05:00
commit b22a1c973c
20 changed files with 433 additions and 0 deletions

8
server/utils/crypto.js Normal file
View 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 };