This commit is contained in:
2024-09-05 19:33:30 -04:00
parent 51da011d12
commit 7f6116450f
187 changed files with 81911 additions and 388 deletions

9
src/utils/crypto.js Normal file
View File

@@ -0,0 +1,9 @@
import { v4 as uuidv4 } from 'uuid';
import CryptoJS from 'crypto-js';
// Generate a session ID hash
export const generateUniqueId = () => {
const uuid = uuidv4();
const hash = CryptoJS.SHA256(uuid).toString();
return hash.substring(0, 28); // Use the first 8 characters of the hash
};