Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prune

Manav Rathi9583b31bfc43
diff --git a/web/packages/shared/crypto/internal/crypto.worker.ts b/web/packages/shared/crypto/internal/crypto.worker.ts
index 92d02fcab8..fdf5ab5fbf 100644
--- a/web/packages/shared/crypto/internal/crypto.worker.ts
+++ b/web/packages/shared/crypto/internal/crypto.worker.ts
@@ -3,22 +3,7 @@ import * as libsodium from "@ente/shared/crypto/internal/libsodium";
import * as Comlink from "comlink";
import type { StateAddress } from "libsodium-wrappers";
-const textDecoder = new TextDecoder();
-
export class DedicatedCryptoWorker {
- async decryptMetadata(
- encryptedMetadata: string,
- header: string,
- key: string,
- ) {
- const encodedMetadata = await libsodium.decryptChaChaOneShot(
- await libsodium.fromB64(encryptedMetadata),
- await libsodium.fromB64(header),
- key,
- );
- return JSON.parse(textDecoder.decode(encodedMetadata));
- }
-
async decryptThumbnail(
fileData: Uint8Array,
header: Uint8Array,