finish simple "add password function"
This commit is contained in:
parent
cbbb631e08
commit
b954a4dcab
13 changed files with 314 additions and 26 deletions
|
|
@ -10,7 +10,9 @@ import Foundation
|
|||
import SwiftyUserDefaults
|
||||
|
||||
extension DefaultsKeys {
|
||||
static let pgpKeyURL = DefaultsKey<URL?>("pgpKeyURL")
|
||||
// static let pgpKeyURL = DefaultsKey<URL?>("pgpKeyURL")
|
||||
static let pgpPublicKeyURL = DefaultsKey<URL?>("pgpPublicKeyURL")
|
||||
static let pgpPrivateKeyURL = DefaultsKey<URL?>("pgpPrivateKeyURL")
|
||||
|
||||
static let pgpKeyPassphrase = DefaultsKey<String>("pgpKeyPassphrase")
|
||||
static let pgpKeyID = DefaultsKey<String>("pgpKeyID")
|
||||
|
|
@ -31,7 +33,8 @@ extension DefaultsKeys {
|
|||
|
||||
extension Utils {
|
||||
static func eraseAllUserDefaults() {
|
||||
Defaults.remove(.pgpKeyURL)
|
||||
Defaults.remove(.pgpPublicKeyURL)
|
||||
Defaults.remove(.pgpPrivateKeyURL)
|
||||
|
||||
Defaults.remove(.pgpKeyPassphrase)
|
||||
Defaults.remove(.pgpKeyID)
|
||||
|
|
|
|||
|
|
@ -10,9 +10,13 @@ import Foundation
|
|||
|
||||
class Globals {
|
||||
static let documentPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0];
|
||||
static let secringPath = "\(documentPath)/secring.gpg"
|
||||
static let pgpPublicKeyPath = "\(documentPath)/gpg_key.pub"
|
||||
static let pgpPrivateKeyPath = "\(documentPath)/gpg_key"
|
||||
|
||||
static let sshPublicKeyURL = URL(fileURLWithPath: "\(documentPath)/ssh_key.pub")
|
||||
static let sshPrivateKeyURL = URL(fileURLWithPath: "\(documentPath)/ssh_key")
|
||||
|
||||
static let repositoryPath = "\(documentPath)/password-store"
|
||||
static var passcodeConfiguration = PasscodeLockConfiguration()
|
||||
static let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
|
||||
private init() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue