Store `user_mac_key
` in keychain and not in plaintext preference file
This commit is contained in:
parent
555e7cca3c
commit
c4fdb2b5cd
7 changed files with 66 additions and 9 deletions
|
@ -10,6 +10,23 @@ define(function() {
|
|||
controller.setStringForKey(string, key);
|
||||
}
|
||||
}
|
||||
|
||||
HostApp.setSecret = function(string) {
|
||||
|
||||
if (OS_TYPE == "mac") {
|
||||
controller.setSecret_(string);
|
||||
} else {
|
||||
controller.setStringForKey(string, "user_mac_key");
|
||||
}
|
||||
}
|
||||
|
||||
HostApp.secret = function() {
|
||||
if (OS_TYPE == "mac") {
|
||||
return controller.secret();
|
||||
} else {
|
||||
return controller.stringForKey("user_mac_key");
|
||||
}
|
||||
}
|
||||
|
||||
HostApp.stringForKey = function(key) {
|
||||
|
||||
|
|
Reference in a new issue