I have a huge encrypted file(mp4) about 700MB. Header of file is encrypted about (1MB+dummy bytes). The decryption of this file is done successfully.
Now i want to remove the (1MB+dummy) encrypted bytes in file (same file) & replace them with decrypted bytes.
How can i achieve the same? Any help in this regard will be appreciated. Thanks in advance.
NSFileHandle *encVideoFile=[NSFileHandle fileHandleForUpdatingAtPath:**encVideoFilePath**];
//the data is read from file by using readDataOfLength method & decrypted (decryptedData).
[encVideoFile seekToFileOffset:0];
[encVideoFile writeData:decryptedData];
[encVideoFile closeFile];
The problem that i'm facing here is I've (1MB+ DummyBytes) encrypted & when I Decrypt 1MB+ DummyBytes I Get around 0.9MB (Decrypted bytes).
So Still my problem persists(0.9MB+ Some Unwanted Bytes + Unencrypted Bytes).
Suggestions on how to overcome will be helpful.