change Globals class to static
This commit is contained in:
parent
825cd5446d
commit
f9e42b9490
7 changed files with 27 additions and 28 deletions
|
|
@ -38,7 +38,7 @@ class Password {
|
|||
extension PasswordEntity {
|
||||
func decrypt() throws -> Password? {
|
||||
var password: Password?
|
||||
let encryptedDataPath = URL(fileURLWithPath: "\(Globals.shared.documentPath)/\(rawPath!)")
|
||||
let encryptedDataPath = URL(fileURLWithPath: "\(Globals.documentPath)/\(rawPath!)")
|
||||
let encryptedData = try Data(contentsOf: encryptedDataPath)
|
||||
let decryptedData = try PasswordStore.shared.pgp.decryptData(encryptedData, passphrase: Defaults[.pgpKeyPassphrase])
|
||||
let plain = String(data: decryptedData, encoding: .ascii) ?? ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue