clarify public vs private keys + make prvate key IDs available
This commit is contained in:
parent
4e19d9e714
commit
5a92b6fda7
11 changed files with 56 additions and 30 deletions
|
|
@ -167,12 +167,17 @@ struct GopenPGPInterface: PGPInterface {
|
|||
return encryptedData.getBinary()!
|
||||
}
|
||||
|
||||
var keyID: [String] {
|
||||
publicKeys.keys.map { $0.uppercased() }
|
||||
func getKeyIDs(type: PGPKey) -> [String] {
|
||||
switch type {
|
||||
case .PUBLIC:
|
||||
return publicKeys.keys.map { $0.uppercased() }
|
||||
case .PRIVATE:
|
||||
return privateKeys.keys.map { $0.uppercased() }
|
||||
}
|
||||
}
|
||||
|
||||
var shortKeyID: [String] {
|
||||
publicKeys.keys.map { $0.suffix(8).uppercased() }
|
||||
func getShortKeyIDs(type: PGPKey) -> [String] {
|
||||
getKeyIDs(type: type).map { $0.suffix(8).uppercased() }
|
||||
}
|
||||
|
||||
private func findDecryptionKey(message: CryptoPGPMessage, keyIDHint: String?) throws -> CryptoKey? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue