Skip to content

Commit

Permalink
Rename method.
Browse files Browse the repository at this point in the history
  • Loading branch information
yspreen committed Apr 28, 2021
1 parent 3bdb0e9 commit e3432b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DGCAVerifier/Services/Enclave.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion DGCAVerifier/Services/SecureStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct SecureDB: Codable {
struct SecureStorage<T: Codable> {
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.
Expand Down

0 comments on commit e3432b6

Please sign in to comment.