Some additional headers needed to decrypt the payload
This commit is contained in:
@@ -30,7 +30,15 @@ static NSString *const kSymmetricKey = @"axPy0nljtG/TOVJSVwVXag==";
|
|||||||
NSLog(@"Error encrypting response: %@", error);
|
NSLog(@"Error encrypting response: %@", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [[self alloc] initWithData:encryptedData contentType:@"application/octet-stream"];
|
NSString *ivDataString = [ivData base64EncodedStringWithOptions:0];
|
||||||
|
|
||||||
|
GCDWebServerDataResponse *response = [[self alloc] initWithData:encryptedData contentType:@"application/octet-stream"];
|
||||||
|
[response setValue:ivDataString forAdditionalHeader:@"X-KordophoneCrypto-IV"];
|
||||||
|
|
||||||
|
// TODO: is this the right way??
|
||||||
|
[response setValue:[NSString stringWithFormat:@"%lu", (unsigned long)[data length]] forAdditionalHeader:@"X-Decrypted-Content-Length"];
|
||||||
|
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user