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-10-20 09:15:52 +09:00

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