const jwt = require('jsonwebtoken'); function toHexString(bytes) { return Array.from(bytes, byte => ("00" + (byte & 0xFF).toString(16)).slice(-2) ).join(''); } module.exports = { getlinkregByEmail: function (email, username) { try{ mystr = email + username; return jwt.sign(toHexString(mystr), process.env.SIGNCODE).toString(); } catch (e) { console.error(e); } }, };