Encryption support for multi keys

This commit is contained in:
Mingshen Sun 2020-04-13 10:25:01 -07:00
parent b7ee00815c
commit e62f4714e8
3 changed files with 11 additions and 4 deletions

View file

@ -711,7 +711,9 @@ public class PasswordStore {
}
public func encrypt(password: Password) throws -> Data {
return try PGPAgent.shared.encrypt(plainData: password.plainData, keyID: "")
let encryptedDataPath = storeURL.appendingPathComponent(password.url.path)
let keyID = findGPGID(from: encryptedDataPath)
return try PGPAgent.shared.encrypt(plainData: password.plainData, keyID: keyID)
}
public func removeGitSSHKeys() {