I am using AES/CTR/NoPadding to encrypt while downloading files in one of my application. The encryption is done along with downloading. When the internet is not available in the middle of downloading, I need to pause the download and resume it when the network is available. Since the iv gets initialised to 0 state on resuming encryption, my resulting file gets corrupted. Is there any way to move the counter/iv to the previous state so I can resume encryption properly?