I am trying to decrypt files by
Java and below codes work. However it will have OutOfMemory exception when decrypting large files. I researched and seems like my problem is that I am reading the whole encrypted file into memory. People suggested to use cipher.update. However if I switch to that, the program will just not respond.
How can I solve my problem? Thanks.