Remove unused elements (#530)

This commit is contained in:
Danny Moesch 2021-12-31 07:35:17 +01:00 committed by GitHub
parent ff6a1edf62
commit 819371f55e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 9 additions and 111 deletions

View file

@ -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

View file

@ -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)
}

View file

@ -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) }

View file

@ -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"

View file

@ -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()