Extract key importing logic and put it into separate class

This commit is contained in:
Danny Moesch 2019-06-29 23:09:24 +02:00 committed by Mingshen Sun
parent 47c9af0127
commit 7bee780b46
7 changed files with 148 additions and 36 deletions

View file

@ -91,10 +91,10 @@ class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController
override func viewDidLoad() {
super.viewDidLoad()
if let publicKey: Data = AppKeychain.get(for: PasswordStore.PGPKeyType.PUBLIC.rawValue) {
if let publicKey: Data = AppKeychain.get(for: PgpKeyType.PUBLIC.getKeychainKey()) {
armorPublicKeyTextView.text = String(data: publicKey, encoding: .ascii)
}
if let privateKey: Data = AppKeychain.get(for: PasswordStore.PGPKeyType.PRIVATE.rawValue) {
if let privateKey: Data = AppKeychain.get(for: PgpKeyType.PRIVATE.getKeychainKey()) {
armorPrivateKeyTextView.text = String(data: privateKey, encoding: .ascii)
}