Exemplo n.º 1
0
        private static void SaveCipherKeys()
        {
            switch (System.Windows.Forms.MessageBox.Show(string.Format(UserHelper.culture, "Save Cipher Keys{0}{0}This action will destroy the existing encryption and authentication key pair and cannot be undone.  All existing encrytped values held in the application will need to be recreated{0}{0}Are you sure you wish to continue?", System.Environment.NewLine), ConnectionHelper.ApplicationName(false, false), System.Windows.Forms.MessageBoxButtons.YesNoCancel, System.Windows.Forms.MessageBoxIcon.Information, System.Windows.Forms.MessageBoxDefaultButton.Button3))
            {
            case System.Windows.Forms.DialogResult.Yes:

                Properties.Settings.Default.HashKey = hashKey;
                Properties.Settings.Default.Save();
                bKeysSaved = true;

                break;

            default:

                break;
            }
        }