Put Keychain related methods to separate class
This commit is contained in:
parent
e4e4c6daff
commit
441a7f1e9b
5 changed files with 76 additions and 52 deletions
|
|
@ -90,8 +90,14 @@ class PGPKeyArmorSettingTableViewController: AutoCellHeightUITableViewController
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
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)
|
||||
|
||||
if let publicKey: Data = AppKeychain.get(for: PasswordStore.PGPKeyType.PUBLIC.rawValue) {
|
||||
armorPublicKeyTextView.text = String(data: publicKey, encoding: .ascii)
|
||||
}
|
||||
if let privateKey: Data = AppKeychain.get(for: PasswordStore.PGPKeyType.PRIVATE.rawValue) {
|
||||
armorPrivateKeyTextView.text = String(data: privateKey, encoding: .ascii)
|
||||
}
|
||||
|
||||
pgpPassphrase = passwordStore.pgpKeyPassphrase
|
||||
|
||||
scanPublicKeyCell?.textLabel?.text = "ScanPublicKeyQrCodes".localize()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue