use keychain to store pgp passphrase and git password
This commit is contained in:
parent
ceb52a5b33
commit
90709675a3
10 changed files with 86 additions and 19 deletions
|
|
@ -14,7 +14,7 @@ extension PasswordEntity {
|
|||
var password: Password?
|
||||
let encryptedDataPath = URL(fileURLWithPath: "\(Globals.repositoryPath)/\(rawPath!)")
|
||||
let encryptedData = try Data(contentsOf: encryptedDataPath)
|
||||
let decryptedData = try PasswordStore.shared.pgp.decryptData(encryptedData, passphrase: Defaults[.pgpKeyPassphrase])
|
||||
let decryptedData = try PasswordStore.shared.pgp.decryptData(encryptedData, passphrase: PasswordStore.shared.pgpKeyPassphrase!)
|
||||
let plainText = String(data: decryptedData, encoding: .ascii) ?? ""
|
||||
password = Password(name: name!, plainText: plainText)
|
||||
return password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue