Remove unused elements (#530)
This commit is contained in:
parent
ff6a1edf62
commit
819371f55e
27 changed files with 9 additions and 111 deletions
|
|
@ -16,7 +16,6 @@ public enum AppError: Error, Equatable {
|
|||
case gitReset
|
||||
case gitCreateSignature
|
||||
case gitPushNotSuccessful
|
||||
case passwordEntity
|
||||
case pgpPublicKeyNotFound(keyID: String)
|
||||
case pgpPrivateKeyNotFound(keyID: String)
|
||||
case keyExpiredOrIncompatible
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ public class AppKeychain: KeyStore {
|
|||
.accessibility(.whenUnlockedThisDeviceOnly)
|
||||
.synchronizable(false)
|
||||
|
||||
public func add(data: Data?, for key: String) {
|
||||
keychain[data: key] = data
|
||||
}
|
||||
|
||||
public func add(string: String?, for key: String) {
|
||||
keychain[key] = string
|
||||
}
|
||||
|
|
@ -27,10 +23,6 @@ public class AppKeychain: KeyStore {
|
|||
(try? keychain.contains(key)) ?? false
|
||||
}
|
||||
|
||||
public func get(for key: String) -> Data? {
|
||||
try? keychain.getData(key)
|
||||
}
|
||||
|
||||
public func get(for key: String) -> String? {
|
||||
try? keychain.getString(key)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ public extension DefaultsKeys {
|
|||
|
||||
var lastSyncedTime: DefaultsKey<Date?> { .init("lastSyncedTime") }
|
||||
|
||||
var isTouchIDOn: DefaultsKey<Bool> { .init("isTouchIDOn", defaultValue: false) }
|
||||
|
||||
var isHideUnknownOn: DefaultsKey<Bool> { .init("isHideUnknownOn", defaultValue: false) }
|
||||
var isHideOTPOn: DefaultsKey<Bool> { .init("isHideOTPOn", defaultValue: false) }
|
||||
var isRememberPGPPassphraseOn: DefaultsKey<Bool> { .init("isRememberPGPPassphraseOn", defaultValue: false) }
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public final class Globals {
|
|||
public static let pgpPublicKeyPath = documentPath + "/gpg_key.pub"
|
||||
public static let pgpPrivateKeyPath = documentPath + "/gpg_key"
|
||||
public static let gitSSHPrivateKeyPath = documentPath + "/ssh_key"
|
||||
public static let gitSSHPrivateKeyURL = URL(fileURLWithPath: gitSSHPrivateKeyPath)
|
||||
public static let repositoryPath = libraryPath + "/password-store"
|
||||
public static let dbPath = documentPath + "/pass.sqlite"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@
|
|||
import Foundation
|
||||
|
||||
public protocol KeyStore {
|
||||
func add(data: Data?, for key: String)
|
||||
func add(string: String?, for key: String)
|
||||
func contains(key: String) -> Bool
|
||||
func get(for key: String) -> Data?
|
||||
func get(for key: String) -> String?
|
||||
func removeContent(for key: String)
|
||||
func removeAllContent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue