【发布时间】:2012-02-06 17:56:56
【问题描述】:
我有一个大约 700MB 的巨大加密文件 (mp4)。文件头被加密了大约(1MB+虚拟字节)。该文件解密成功。
现在我想删除文件(同一文件)中的(1MB+虚拟)加密字节并用解密字节替换它们。
我怎样才能达到同样的效果? 在这方面的任何帮助将不胜感激。提前致谢。
NSFileHandle *encVideoFile=[NSFileHandle fileHandleForUpdatingAtPath:**encVideoFilePath**];
//the data is read from file by using readDataOfLength method & decrypted (decryptedData).
[encVideoFile seekToFileOffset:0];
[encVideoFile writeData:decryptedData];
[encVideoFile 关闭文件];
我在这里面临的问题是我已经(1MB+ DummyBytes)加密并且当我解密 1MB+ DummyBytes 时,我得到大约 0.9MB(解密字节)。
所以我的问题仍然存在(0.9MB+ 一些不需要的字节 + 未加密的字节)。
关于如何克服的建议会有所帮助。
【问题讨论】:
标签: iphone objective-c ios nsdata nsfilehandle