fix: scripts
parent
bd569c1c80
commit
854c02f8cb
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue