Ich bin bei dieser Methode fest und ich weiß nicht warum! Kann mir jemand auf irgendeinen Quellcode hinweisen? Vielen Dank! Das ist mein Quellcode:Stuck/Leck bei der Zuordnung von Daten für NSData?
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
.......
readData = [readFileHandle readDataOfLength:defaultLen]
NSData *decryptedData = nil;
//check is last buffer of file
NSUInteger exLen = [readData length] % 16;
NSUInteger decryptionLen = [readData length] - exLen;
NSData *dataForDecryption = nil;
if(exLen != 0)
{
stuck at here-> [readData getBytes:dataForDecryption length:decryptionLen];
//
decryptedData = [dataForDecryption AES256DecryptWithKey:KEY];
self.isEndOfFile = YES;
}
else
decryptedData = [readData AES256DecryptWithKey:KEY];
[readFileHandle closeFile];
.......
[pool drain];
ich einige Funktionen verwendet haben, wie zum Beispiel:
NSData *dataForDecryption = [[[NSData alloc] initWithBytes:readData length:decryptionLen]autorelease];
NSData *dataForDecryption = [NSData dataWithBytes:readData length:decryptionLen];
Aber ich den gleichen Fehler. Wenn ich dataForDecryption = [readFileHandle readDataOfLength:decryptionLen];
verwende, ist es bei pos oben fest und die gelesene Größe ist 0, obwohl es nicht EOF ist.
Dank
gut zu empfehlen, danke Caleb :) –