AlexGustafsson / drop

A self-hosted, end-to-end encrypted personal file sharing service written in Go and TypeScript using React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewrite file encryption helper

AlexGustafsson opened this issue · comments

Rewrite the file encryption helper function as a generator with yield instead which would remove the need for a callback on successful chunks. Also rewrite with larger block support, like the Go implementation generate as large of a key stream that's necessary, then XOR instead of doing it block by block. Still make sure that it has to be on a block basis, that is, increasing the counter by 1 for each 64 bytes. Should reduce call stack, memory allocations (count, not size).

Superseeded by #12. Closing.