7 lines
208 B
TypeScript
7 lines
208 B
TypeScript
export function createOpaqueId(): string {
|
|
const bytes = globalThis.crypto.getRandomValues(new Uint8Array(16));
|
|
return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join(
|
|
"",
|
|
);
|
|
}
|