summary refs log tree commit diff
path: root/src/gateway/util/SessionUtils.ts
blob: bf854042a2e1354a56a5063ca80fcbcec742544a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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("");
}