Introduce CryptographicKey protocol

This commit is contained in:
Danny Moesch 2019-07-02 20:20:56 +02:00 committed by Mingshen Sun
parent d43a3be6f6
commit 6b95e60ea1
6 changed files with 30 additions and 24 deletions

View file

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