So.. I have encrypted data from server that need to be decrypted so that I can get the full response JSON. The thing is I need to split the first 16 bytes of data to get the IV for decryption and the rest of the bytes is the encrypted data. I tried below method:

```
NSData *wholeData = [[NSData alloc] initWithBase64EncodedString:@"IYSaYh92saFT5t/ueQQtlTaFT1oW33FXPLDUsRMATBLUrY/6Z1VGK1KFmyeRwHpbi85T7ZNzDQAl5v8cu60DcJLwVQDI6KdwbmCq0+L62IM7Ixw60+G8gTkm+6+MLtyE" options:0];

NSData *d1 = [wholeData subdataWithRange:NSMakeRange(0, 16)];
NSData *d2 = [wholeData subdataWithRange:NSMakeRange(17, wholeData.length)];

NSData *enc = d2;
NSData *key = [[NSData alloc] initWithBase64EncodedString:@"alskd81039aisdf/tusd8341iasldkjfY=" options:0];
NSData *enciv = d1;

NSData *decrypted = [FBEncryptorAES decryptData:enc key:key iv:enciv];

```

Then I got below error:

> 
> Terminating app due to uncaught exception 'NSRangeException', reason: '\*\*\* -[NSConcreteData subdataWithRange:]: range {17, 96} exceeds data length 96'
> 
> 
> 

How can I fix my issue?