Store PGP keys in Keychain
This commit is contained in:
parent
ca3271b20a
commit
a66a79abc6
5 changed files with 40 additions and 53 deletions
|
|
@ -32,6 +32,14 @@ public class Utils {
|
|||
try? keychain.removeAll()
|
||||
}
|
||||
|
||||
public static func addDataToKeychain(key: String, data: Data) {
|
||||
keychain[data: key] = data
|
||||
}
|
||||
|
||||
public static func getDataFromKeychain(for key: String) -> Data? {
|
||||
return try? keychain.getData(key)
|
||||
}
|
||||
|
||||
public static func copyToPasteboard(textToCopy: String?) {
|
||||
guard textToCopy != nil else {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue