Closed vishnukvmd closed 3 years ago
I'd first check if this is some kind of I/O problem (e.g. high level I/O library doing weird things to strings containing binary data), then take a look at the offset/size calculations (I never get them right on the first try), e.g. unroll the loop for one to two iterations and use a file for testing that fits within that.
Yes, looks like my understanding of Dart's I/O APIs was lacking. Fixed the problem by simply using the correct one to append to a file (https://github.com/ente-io/frame/commit/e574a0d8d22e5eb8f082df98ab396086a1174f80).
Firstly, thank you for libsodium, it has been a life saver.
I'm currently using flutter_sodium and am running into issues while trying to decrypt a large file that was encrypted with
Xchacha20poly1305
.This is how I'm encrypting the file:
This is how I'm decrypting the file:
Here the first decryption "pull" fails with the following error:
As per the documentation, this means that the ciphertext is invalid.
But I'm not sure what is amiss here. Would be great if you could help out. Thank you!