2026-09-10 19:12:31 +00:00
|
|
|
// Module ID: 6649
|
|
|
|
|
// Function ID: 6650
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: WebAuthnUtils
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: encodeUserIdForWebAuthn
|
|
|
|
|
|
2026-09-10 19:12:31 +00:00
|
|
|
// Module 6649 (WebAuthnUtils)
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/webauthn/WebAuthnUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
export const encodeUserIdForWebAuthn = function encodeUserIdForWebAuthn(id) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const uint8Array = new Uint8Array(16);
|
|
|
|
|
const dataView = new DataView(uint8Array.buffer);
|
|
|
|
|
dataView.setUint32(0, 821232635);
|
|
|
|
|
dataView.setUint16(4, 35878);
|
|
|
|
|
dataView.setUint16(6, 20307);
|
2026-09-10 05:38:07 +00:00
|
|
|
dataView.setBigUint64(8, BigInt(id));
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [...uint8Array];
|
|
|
|
|
const str = btoa(String.fromCharCode.apply(items));
|
|
|
|
|
const str2 = btoa(String.fromCharCode.apply(items)).replace(/\+/g, "-");
|
|
|
|
|
return btoa(String.fromCharCode.apply(items)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
|
|
|
};
|