COVIDSafe code from version 1.8 (#15)

This commit is contained in:
COVIDSafe Support 2020-07-21 15:42:48 +10:00 committed by covidsafe-support
parent 6f92ff8fb8
commit 2257c542ed
45 changed files with 3547 additions and 839 deletions

View file

@ -17,7 +17,8 @@ class EncounterMessageManager {
rssi: nil,
txPower: nil,
modelP: DeviceIdentifier.getModel(),
msg: tempId)
msg: tempId,
timestamp: Date().timeIntervalSince1970)
let jsonMsg = try JSONEncoder().encode(broadcastPayload)
let encryptedJsonMsg = try Crypto.encrypt(dataToEncrypt: jsonMsg)
let peripheralCharStruct = PeripheralCharacteristicsData(modelP: BluetraceConfig.DummyModel, msg: encryptedJsonMsg, org: BluetraceConfig.OrgID, v: BluetraceConfig.ProtocolVersion)
@ -61,6 +62,7 @@ class EncounterMessageManager {
onComplete(response.tempId)
return
}
return
}
// we know that tempId has not expired
@ -92,6 +94,7 @@ class EncounterMessageManager {
}
onComplete(nil)
}
return
}
// we know that payload has not expired