1 2 3 4 5 6 7import { createHash } from 'crypto'; export const hashStringToUuid = (input) => { const hash1 = createHash('sha256').update(input).digest(); const hash2 = createHash('sha256').update(hash1).digest('hex'); return hash2.slice(0, 32); }
1 2 3 4 5 6 7
import { createHash } from 'crypto'; export const hashStringToUuid = (input) => { const hash1 = createHash('sha256').update(input).digest(); const hash2 = createHash('sha256').update(hash1).digest('hex'); return hash2.slice(0, 32); }