mirror of
https://github.com/ente-io/ente.git
synced 2025-08-12 17:20:37 +00:00
Inline
This commit is contained in:
parent
2f7923b097
commit
1496b60895
@ -16,7 +16,7 @@ import { basename } from "@/next/file";
|
|||||||
import log from "@/next/log";
|
import log from "@/next/log";
|
||||||
import { CustomErrorMessage } from "@/next/types/ipc";
|
import { CustomErrorMessage } from "@/next/types/ipc";
|
||||||
import { ensure } from "@/utils/ensure";
|
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 { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
|
||||||
import type { B64EncryptionResult } from "@ente/shared/crypto/types";
|
import type { B64EncryptionResult } from "@ente/shared/crypto/types";
|
||||||
import { CustomError, handleUploadError } from "@ente/shared/error";
|
import { CustomError, handleUploadError } from "@ente/shared/error";
|
||||||
|
@ -1 +0,0 @@
|
|||||||
export const ENCRYPTION_CHUNK_SIZE = 4 * 1024 * 1024;
|
|
@ -9,7 +9,6 @@
|
|||||||
import { mergeUint8Arrays } from "@/utils/array";
|
import { mergeUint8Arrays } from "@/utils/array";
|
||||||
import { CustomError } from "@ente/shared/error";
|
import { CustomError } from "@ente/shared/error";
|
||||||
import sodium, { type StateAddress } from "libsodium-wrappers";
|
import sodium, { type StateAddress } from "libsodium-wrappers";
|
||||||
import { ENCRYPTION_CHUNK_SIZE } from "../constants";
|
|
||||||
import type { B64EncryptionResult } from "../types";
|
import type { B64EncryptionResult } from "../types";
|
||||||
|
|
||||||
export async function fromB64(input: string) {
|
export async function fromB64(input: string) {
|
||||||
@ -115,6 +114,8 @@ export async function decryptChaChaOneShot(
|
|||||||
return pullResult.message;
|
return pullResult.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ENCRYPTION_CHUNK_SIZE = 4 * 1024 * 1024;
|
||||||
|
|
||||||
export const decryptChaCha = async (
|
export const decryptChaCha = async (
|
||||||
data: Uint8Array,
|
data: Uint8Array,
|
||||||
header: Uint8Array,
|
header: Uint8Array,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user