|
const { key, ciphertext } = await genAndEncrypt(encryptionScheme, await editorState.file.bytes()) |
arrayBuffer() should be used here since there is no bytes() method in Browser.
const fileContent = await editorState.file.arrayBuffer()│
const { key, ciphertext } = await genAndEncrypt(encryptionScheme, new Uint8Array(fileContent))