changes PasswordStore.encrypt behavior when .gpg-id support is off
(default):
old:
* ignores passed in keyID
* encrypt with first public key in keychain (gopenPGP), or entire
keychain (ObjectivePGP)
new:
* honor passed in keyID
* encrypt with all keys in keychain
23 lines
671 B
Swift
23 lines
671 B
Swift
//
|
|
// PGPInterface.swift
|
|
// passKit
|
|
//
|
|
// Created by Danny Moesch on 08.09.19.
|
|
// Copyright © 2019 Bob Sun. All rights reserved.
|
|
//
|
|
|
|
protocol PGPInterface {
|
|
func decrypt(encryptedData: Data, keyIDHint: String?, passPhraseForKey: @escaping (String) -> String) throws -> Data?
|
|
|
|
// 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
|
|
|
|
func containsPublicKey(with keyID: String) -> Bool
|
|
|
|
func containsPrivateKey(with keyID: String) -> Bool
|
|
|
|
var keyID: [String] { get }
|
|
|
|
var shortKeyID: [String] { get }
|
|
}
|