Beispiel #1
0
        /// <summary>
        ///     Encrypt the passed password and set in preferences. Always persist the preference
        /// </summary>
        /// <param name="decryptedPassword">A human readable password</param>
        public static void SetPassword(string decryptedPassword)
        {
            var encryptedPassword = decryptedPassword.Encrypt(KeyConstants.Key);

            PreferenceManager.SetPreference(PrefConstants.Password, encryptedPassword);
            PreferenceManager.SavePreferences();
        }
Beispiel #2
0
 protected override void OnExit(ExitEventArgs e)
 {
     PreferenceManager.SavePreferences();
 }