Merge pull request #477 from SimplyDanny/use-protonmail-gopenpgp
Use ProtonMail's GopenPGP library
This commit is contained in:
commit
75332270d6
6 changed files with 158 additions and 49 deletions
|
|
@ -6,12 +6,12 @@
|
|||
// Copyright © 2019 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import Crypto
|
||||
import Gopenpgp
|
||||
|
||||
struct GopenPGPInterface: PGPInterface {
|
||||
private static let errorMapping: [String: Error] = [
|
||||
"gopenpgp: error in unlocking key: openpgp: invalid data: private key checksum failure": AppError.wrongPassphrase,
|
||||
"openpgp: incorrect key": AppError.keyExpiredOrIncompatible,
|
||||
"gopenpgp: error in reading message: openpgp: incorrect key": AppError.keyExpiredOrIncompatible,
|
||||
]
|
||||
|
||||
private var publicKeys: [String: CryptoKey] = [:]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue