summaryrefslogtreecommitdiff
path: root/together/src/utils/PartyCodes.ts
blob: 1acc82eae7f57d04361a54f018b7134147c97303 (plain)
1
2
3
4
5
import {randomBytes} from 'crypto';

export function generateParyCode(): string {
    return parseInt(randomBytes(16).toString("hex"), 16).toString(36).substring(0, 8);
}