summary refs log tree commit diff
path: root/src/gateway/util/SessionUtils.ts
blob: c66c7e76be5d06f48852469b511a537c32436d0b (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("");
}