diff --git a/scripts/export-geardata.ts b/scripts/export-geardata.ts index ff9de8d..1c7f1bc 100644 --- a/scripts/export-geardata.ts +++ b/scripts/export-geardata.ts @@ -23,7 +23,7 @@ function encryptKey(uid: string) { hasher.hash(uid); const hash = hasher.result(); const key = hash & 0xff; - const encrypted = base64.encode( + const encrypted = base64.encodeBase64( new TextEncoder().encode(uid).map((i) => i ^ key), ); return { diff --git a/scripts/find-id.ts b/scripts/find-id.ts index d5fdcb6..31bb2f2 100644 --- a/scripts/find-id.ts +++ b/scripts/find-id.ts @@ -20,7 +20,7 @@ for (const file of files) { const content: FileExporterType = JSON.parse(await Deno.readTextFile(file)); if (content.type === "SUMMARY") continue; const id = content.data.detail.id; - const rawId = base64.decode(id); + const rawId = base64.decodeBase64(id); const uuid = new TextDecoder().decode(rawId.slice(rawId.length - 36)); if (ids.has(uuid)) { console.log(