How to append to AES encrypted file
If you’re using AES in CBC mode, you can use the second to last block as the IV to decrypt the last block, which may be only partially full, then again to encrypt the plaintext of the last block followed by the new plaintext. Here’s a proof of concept: import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; … Read more