Add ignore .gpg-id switch default ON
This commit is contained in:
parent
6280b1522b
commit
a62792bd11
9 changed files with 91 additions and 13 deletions
|
|
@ -29,11 +29,11 @@ struct ObjectivePGPInterface: PGPInterface {
|
|||
self.privateKey = privateKey
|
||||
}
|
||||
|
||||
func decrypt(encryptedData: Data, keyID _: String, passphrase: String) throws -> Data? {
|
||||
func decrypt(encryptedData: Data, keyID _: String?, passphrase: String) throws -> Data? {
|
||||
try ObjectivePGP.decrypt(encryptedData, andVerifySignature: false, using: keyring.keys) { _ in passphrase }
|
||||
}
|
||||
|
||||
func encrypt(plainData: Data, keyID _: String) throws -> Data {
|
||||
func encrypt(plainData: Data, keyID _: String?) throws -> Data {
|
||||
let encryptedData = try ObjectivePGP.encrypt(plainData, addSignature: false, using: keyring.keys, passphraseForKey: nil)
|
||||
if Defaults.encryptInArmored {
|
||||
return Armor.armored(encryptedData, as: .message).data(using: .ascii)!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue