COVIDSafe code from version 1.5 (#5)

This commit is contained in:
COVIDSafe Support 2020-06-05 10:26:40 +10:00 committed by GitHub
parent 6b262be150
commit 149daee2e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 825 additions and 652 deletions

View file

@ -62,12 +62,12 @@ class Crypto {
}
// CREATE A LOCAL EPHEMERAL P-256 KEYPAIR
let ephereralPublicKeyAttributes: [CFString: Any] = [
let ephemeralPublicKeyAttributes: [CFString: Any] = [
kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
kSecAttrKeySizeInBits: 256,
]
guard let ephemeralPrivateKey = SecKeyCreateRandomKey(ephereralPublicKeyAttributes as CFDictionary, &err) else {
guard let ephemeralPrivateKey = SecKeyCreateRandomKey(ephemeralPublicKeyAttributes as CFDictionary, &err) else {
throw err!.takeRetainedValue() as Error
}
guard let ephemeralPublicKey = SecKeyCopyPublicKey(ephemeralPrivateKey) else {