Вопрос

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