There's this NSMutableData *dump to which I must append some NSData *chunk.

chunk is 440 bytes and contains the raw bytes read from a file. The file also weights 440 bytes. Good so far.

Now, I must append this:

NSMutableData *dump = [NSMutableData data];
[dump appendData:chunk];

dump weight 448 bytes. Writing dump to a file causes the file to weight 448 bytes. How can this behavior be explained?

Thanks,

有帮助吗?

解决方案

A category was added to NSData to override the default behavior of writeToFile:atomically:

AES256 add a few byte to the chunk it encrypts.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top