Use computed properties instead of separate getter methods

This commit is contained in:
Danny Moesch 2018-06-23 20:42:56 +02:00 committed by Bob Sun
parent f76721d7fe
commit 904d04d71c
5 changed files with 44 additions and 62 deletions

View file

@ -850,7 +850,7 @@ public class PasswordStore {
guard keyring.keys.count > 0 else {
throw AppError.PGPPublicKeyNotExistError
}
let plainData = password.getPlainData()
let plainData = password.plainData
let encryptedData = try ObjectivePGP.encrypt(plainData, addSignature: false, using: keyring.keys, passphraseForKey: nil)
if SharedDefaults[.encryptInArmored] {
return Armor.armored(encryptedData, as: .message).data(using: .utf8)!