당신은 분명히 다른 요청에 하드 코드 또는 공유에 키에 어떤 링크 사전 및 식별자를해야하지만 난
예 두 가지를 들면, 일부 식별자를 추가 할 할 ... 있음을 드리겠습니다 숫자
다음
...
const Byte identifierBytes[2] = { 0xFF, 0xAA }; //two identifier bytes
NSMutableData *dataToSendToServer = [[NSMutableData alloc] initWithBytes:identifierBytes length:2];
[dataToSendToServer appendData:encryptedDataToSendToServer];
//send the dataToSendToServer to the server...
...
응용 프로그램 측의 식별자를 읽을 수 ...
...
const Byte *identifierBytes = [[dataFromTheServer subdataWithRange:NSMakeRange(0, 2)] bytes];
if (identifierBytes[0] == 0xFF && identifierBytes[1] == 0xAA) {
//the bytes are for the identifier {0xFF,0xAA}
NSData *encryptedDataFromServer = [dataFromTheServer subdataWithRange:NSMakeRange(2, dataFromTheServer.length - 2)];
}
...
당신은로를 통해 확인 할 수 있습니다
메모리에서 작성하지만 당신은 할 수 있어야한다 아이디어를 얻으려면