|
|
@ -390,12 +390,10 @@ class CDSBatchOperation: OWSOperation {
|
|
|
|
|
|
|
|
|
|
|
|
func parseAndDecrypt(response: Any?, remoteAttestation: RemoteAttestation) throws -> Data {
|
|
|
|
func parseAndDecrypt(response: Any?, remoteAttestation: RemoteAttestation) throws -> Data {
|
|
|
|
|
|
|
|
|
|
|
|
guard let responseDict = response as? [String: AnyObject] else {
|
|
|
|
guard let params = ParamParser(responseObject: response) else {
|
|
|
|
throw ContactDiscoveryError.parseError(description: "missing response dict")
|
|
|
|
throw ContactDiscoveryError.parseError(description: "missing response dict")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let params = ParamParser(dictionary: responseDict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let cipherText = try params.requiredBase64EncodedData(key: "data")
|
|
|
|
let cipherText = try params.requiredBase64EncodedData(key: "data")
|
|
|
|
let initializationVector = try params.requiredBase64EncodedData(key: "iv")
|
|
|
|
let initializationVector = try params.requiredBase64EncodedData(key: "iv")
|
|
|
|
let authTag = try params.requiredBase64EncodedData(key: "mac")
|
|
|
|
let authTag = try params.requiredBase64EncodedData(key: "mac")
|
|
|
|