summary refs log tree commit diff
path: root/gateway/src/util/SessionUtils.ts
blob: 1ca233161958f8760af035df34adc1a072f32423 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
export function genSessionId() {
    return genRanHex(32)
}

export function genVoiceToken() {
    return genRanHex(16)
}

function genRanHex(size: number) {
    return [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
}