mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 13:05:21 +00:00
COVIDSafe code from version 1.5 (#5)
This commit is contained in:
parent
6b262be150
commit
149daee2e9
21 changed files with 825 additions and 652 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue