Example #1
0
 internal static string SetSettingsString(string setting)
 {
     return(Util.GetString(ProtectedData.Protect(Util.GetBytes(setting), null, DataProtectionScope.LocalMachine)));
 }
Example #2
0
 internal static string GetSettingsString(string o)
 {
     // We can increase security adding some entropy but we are not that paranoid, are we? :)
     return(Util.GetString(ProtectedData.Unprotect(Util.GetBytes((string)o), null, DataProtectionScope.LocalMachine)));
 }