Store SSH private keys in Keychain instead of files
This commit is contained in:
parent
6b95e60ea1
commit
f1337622dc
9 changed files with 45 additions and 30 deletions
|
|
@ -22,6 +22,10 @@ public class AppKeychain {
|
|||
keychain[key] = string
|
||||
}
|
||||
|
||||
public static func contains(key: String) -> Bool {
|
||||
return (try? keychain.contains(key)) ?? false
|
||||
}
|
||||
|
||||
public static func get(for key: String) -> Data? {
|
||||
return try? keychain.getData(key)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue