fix: scripts

splashcat-exporter-v2
spacemeowx2 2024-01-31 16:08:32 +08:00 committed by imspace
parent bd569c1c80
commit 854c02f8cb
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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(