Example #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();
        }