2019-09-08 23:00:46 +02:00
|
|
|
//
|
2020-04-19 15:41:30 +02:00
|
|
|
// PGPInterface.swift
|
2019-09-08 23:00:46 +02:00
|
|
|
// passKit
|
|
|
|
|
//
|
|
|
|
|
// Created by Danny Moesch on 08.09.19.
|
|
|
|
|
// Copyright © 2019 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
2020-04-19 15:41:30 +02:00
|
|
|
protocol PGPInterface {
|
2026-03-10 22:16:42 +01:00
|
|
|
func decrypt(encryptedData: Data, keyIDHint: String?, passPhraseForKey: @escaping (String) -> String) throws -> Data?
|
2019-09-08 23:00:46 +02:00
|
|
|
|
2026-03-11 00:21:30 +01:00
|
|
|
// encrypt with all public keys for which we also have a private key
|
|
|
|
|
func encryptWithAllKeys(plainData: Data) throws -> Data
|
|
|
|
|
func encrypt(plainData: Data, keyIDs: [String]) throws -> Data
|
2019-09-08 23:00:46 +02:00
|
|
|
|
2020-04-14 20:20:16 -07:00
|
|
|
func containsPublicKey(with keyID: String) -> Bool
|
|
|
|
|
|
|
|
|
|
func containsPrivateKey(with keyID: String) -> Bool
|
|
|
|
|
|
2020-04-13 19:15:52 -07:00
|
|
|
var keyID: [String] { get }
|
2020-04-11 23:23:38 -07:00
|
|
|
|
2020-04-13 19:15:52 -07:00
|
|
|
var shortKeyID: [String] { get }
|
2019-09-08 23:00:46 +02:00
|
|
|
}
|