MVP
This commit is contained in:
9
src/utils/crypto.js
Normal file
9
src/utils/crypto.js
Normal 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
|
||||
};
|
||||
Reference in New Issue
Block a user