Open chiahsoon opened 2 years ago
Hi @chiahsoon, I see 2 issues:
cipher.update(chunkBuffer)
you add the chunk to the cipher buffer making it grow with each new chunk, you can use cipher.output.getBytes()
to flush the cipher buffer, you will get the current encryption state (write it or pass it to a stream).
Hi! I'm trying to encrypt large file sizes (>= 1 GB) using AES-GCM, but when i try to upload a 1GB file, the page dies before finishing the encryption.
Pretty sure i'm missing some relevant javascript concepts here but any direction/help will be very much appreciated! My code currently looks something like this: