passforios/passExtension/Crypto/PGPInterface.swift

23 lines
503 B
Swift
Raw Normal View History

//
2020-04-19 15:41:30 +02:00
// PGPInterface.swift
// 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 {
2020-04-11 23:23:38 -07:00
func decrypt(encryptedData: Data, keyID: String, passphrase: String) throws -> Data?
2020-04-11 23:23:38 -07:00
func encrypt(plainData: Data, keyID: String) throws -> Data
func containsPublicKey(with keyID: String) -> Bool
func containsPrivateKey(with keyID: String) -> Bool
var keyID: [String] { get }
2020-04-11 23:23:38 -07:00
var shortKeyID: [String] { get }
}