diff --git a/DGCAVerifier/Services/Enclave.swift b/DGCAVerifier/Services/Enclave.swift index c2d45a8..4ee3a7e 100644 --- a/DGCAVerifier/Services/Enclave.swift +++ b/DGCAVerifier/Services/Enclave.swift @@ -93,7 +93,7 @@ struct Enclave { return (item as! SecKey) } - static func generateOrLoadKey(with name: String) -> SecKey? { + static func loadOrGenerateKey(with name: String) -> SecKey? { if let key = loadKey(with: name) { return key } diff --git a/DGCAVerifier/Services/SecureStorage.swift b/DGCAVerifier/Services/SecureStorage.swift index 2e08123..d0702c9 100644 --- a/DGCAVerifier/Services/SecureStorage.swift +++ b/DGCAVerifier/Services/SecureStorage.swift @@ -36,7 +36,7 @@ struct SecureDB: Codable { struct SecureStorage { let documents: URL! = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) var path: URL! { URL(string: documents.absoluteString + "secure.db") } - let secureStorageKey = Enclave.generateOrLoadKey(with: "secureStorageKey") + let secureStorageKey = Enclave.loadOrGenerateKey(with: "secureStorageKey") /** Loads encrypted db and overrides it with an empty one if that fails.