Store PGP keys in Keychain

This commit is contained in:
Danny Moesch 2019-06-24 23:37:01 +02:00 committed by Mingshen Sun
parent ca3271b20a
commit a66a79abc6
5 changed files with 40 additions and 53 deletions

View file

@ -90,8 +90,8 @@ class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController
override func viewDidLoad() {
super.viewDidLoad()
armorPublicKeyTextView.text = SharedDefaults[.pgpPublicKeyArmor]
armorPrivateKeyTextView.text = SharedDefaults[.pgpPrivateKeyArmor]
armorPublicKeyTextView.text = String(data: Utils.getDataFromKeychain(for: PasswordStore.PGPKeyType.PUBLIC.rawValue)!, encoding: .ascii)
armorPrivateKeyTextView.text = String(data: Utils.getDataFromKeychain(for: PasswordStore.PGPKeyType.PRIVATE.rawValue)!, encoding: .ascii)
pgpPassphrase = passwordStore.pgpKeyPassphrase
scanPublicKeyCell?.textLabel?.text = "ScanPublicKeyQrCodes".localize()