clarify public vs private keys + make prvate key IDs available

This commit is contained in:
Lysann Tranvouez 2026-03-11 16:16:50 +01:00
parent 4e19d9e714
commit 5a92b6fda7
11 changed files with 56 additions and 30 deletions

View file

@ -43,14 +43,14 @@ public class PGPAgent {
pgpInterface != nil
}
public func getKeyID() throws -> [String] {
public func getKeyIDs(type: PGPKey) throws -> [String] {
try checkAndInit()
return pgpInterface?.keyID ?? []
return pgpInterface?.getKeyIDs(type: type).sorted() ?? []
}
public func getShortKeyID() throws -> [String] {
public func getShortKeyIDs(type: PGPKey) throws -> [String] {
try checkAndInit()
return pgpInterface?.shortKeyID.sorted() ?? []
return pgpInterface?.getShortKeyIDs(type: type).sorted() ?? []
}
public func decrypt(encryptedData: Data, keyID: String, requestPGPKeyPassphrase: @escaping (String) -> String) throws -> Data? {