mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: make file handling more robust (#5057)
This commit is contained in:
parent
0d70690ec8
commit
d2e687ed0a
11 changed files with 328 additions and 152 deletions
|
@ -1,4 +1,5 @@
|
|||
import { ENCRYPTION_KEY_BITS } from "../constants";
|
||||
import { blobToArrayBuffer } from "./blob";
|
||||
|
||||
export const IV_LENGTH_BYTES = 12;
|
||||
|
||||
|
@ -58,7 +59,7 @@ export const encryptData = async (
|
|||
: data instanceof Uint8Array
|
||||
? data
|
||||
: data instanceof Blob
|
||||
? await data.arrayBuffer()
|
||||
? await blobToArrayBuffer(data)
|
||||
: data;
|
||||
|
||||
// We use symmetric encryption. AES-GCM is the recommended algorithm and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue