decord/source/modules/webauthn/WebAuthnUtils.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

23 lines
868 B
TypeScript

// Module ID: 6540
// Function ID: 6541
// Name: encodeUserIdForWebAuthn
// Dependencies: [2]
// Exports: encodeUserIdForWebAuthn
// Module 6540 (encodeUserIdForWebAuthn)
import set from "set" /* 2 */;
const result = set.fileFinishedImporting("modules/webauthn/WebAuthnUtils.tsx");
export const encodeUserIdForWebAuthn = function encodeUserIdForWebAuthn(c1) {
const uint8Array = new Uint8Array(16);
const dataView = new DataView(uint8Array.buffer);
dataView.setUint32(0, 821232635);
dataView.setUint16(4, 35878);
dataView.setUint16(6, 20307);
dataView.setBigUint64(8, BigInt(c1));
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, "");
};