This commit is contained in:
cmedina committed 2024-09-30 03:53:03 -04:00
1 parent 7f6116450f
commit bb60182164
58 files changed
+2414 -681

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
const { v4: uuidv4 } = require('uuid');
const CryptoJS = require('crypto-js');
// Generate a session ID hash
const generateUniqueId = () => {
const uuid = uuidv4();
const hash = CryptoJS.SHA256(uuid).toString();
// Use the first 28 characters of the hash
return hash.substring(0, 28);
};
module.exports = {
generateUniqueId,
};