문제

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