This commit is contained in:
Manav Rathi 2024-06-26 19:07:48 +05:30
parent 2f7923b097
commit 1496b60895
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import { basename } from "@/next/file";
import log from "@/next/log";
import { CustomErrorMessage } from "@/next/types/ipc";
import { ensure } from "@/utils/ensure";
import { ENCRYPTION_CHUNK_SIZE } from "@ente/shared/crypto/constants";
import { ENCRYPTION_CHUNK_SIZE } from "@ente/shared/crypto/internal/libsodium";
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
import type { B64EncryptionResult } from "@ente/shared/crypto/types";
import { CustomError, handleUploadError } from "@ente/shared/error";

View File

@ -1 +0,0 @@
export const ENCRYPTION_CHUNK_SIZE = 4 * 1024 * 1024;

View File

@ -9,7 +9,6 @@
import { mergeUint8Arrays } from "@/utils/array";
import { CustomError } from "@ente/shared/error";
import sodium, { type StateAddress } from "libsodium-wrappers";
import { ENCRYPTION_CHUNK_SIZE } from "../constants";
import type { B64EncryptionResult } from "../types";
export async function fromB64(input: string) {
@ -115,6 +114,8 @@ export async function decryptChaChaOneShot(
return pullResult.message;
}
export const ENCRYPTION_CHUNK_SIZE = 4 * 1024 * 1024;
export const decryptChaCha = async (
data: Uint8Array,
header: Uint8Array,