So I’ve been through some Cryptomator code and I have a couple questions regarding the Dokan filesystem and en- decryption.
I discovered that, when the request on the Dokan filesystem is made =>
writeFile, but the file size is too large - e.g. 100KB, the
writeFile is called
n times but with smaller buffer size: e.g. 50KB(n1), 50KB(n2).
So the question is - How does the Cryptomator handle these requests so that the final output file can be split into 32KiB chunks and each chunk can be successfully decrypted.
To be more precise, how does Cryptomator connect these parts (50KB, 50KB) together?
32KiB, 18KiB, 32KiB, 18KiB - whole file decryption will result in error – since we are splitting the file into 32KiB chunks.
Same with the
readFile function. It appears to give us a buffer with more or less random length values that contain(- but are not limited to) values of
rawBufferLength). So the second question is how does the Cryptomator read whole 32KiB chunks when only given a buffer of length <
(I hope I understood these methods correctly )
Thanks in advance!