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 };