public void Reset()
        {
            UserName.Value = null;
            Sites.Clear();

            GeneratedPassword.SetValue(string.Empty);
            GeneratedForSite.SetValue(string.Empty);

            // Notify Window to reset the entered passwd
            ResetMasterPassword.SetValue(true);
        }
        private void DoGeneratePassword()
        {
            var selectedEntry = SelectedItem.Value;

            string pw           = new System.Net.NetworkCredential(string.Empty, CurrentMasterPassword.Value).Password;
            var    masterkey    = Algorithm.CalcMasterKey(UserName.Value, pw);
            var    templateSeed = Algorithm.CalcTemplateSeed(masterkey, selectedEntry.SiteName.Value, selectedEntry.Counter.Value);

            GeneratedPassword.SetValue(Algorithm.CalcPassword(templateSeed, selectedEntry.TypeOfPassword.Value));
            GeneratedForSite.SetValue(selectedEntry.SiteName.Value);
        }