This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
ServerSpacebarOld/gateway/src/util/SessionUtils.ts
2021-09-02 19:33:04 +02:00

11 lines
252 B
TypeScript

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('');
}