public IActionResult ChangePassword(VaultChangePasswordViewModel model)
        {
            SyncContext.Lock();
            try
            {
                if (ModelState.IsValid)
                {
                    using (var oldPassword = this.SecureStringConverter.ToSecureString(model.MasterPassword))
                        using (var newPassword = this.SecureStringConverter.ToSecureString(model.NewMasterPassword))
                        {
                            var vaultRepository  = VaultRepositoryFactory.CreateInstance();
                            var currentVaultName = SessionContext.GetCurrentVaultName();
                            if (vaultRepository.IsPasswordValid(currentVaultName, oldPassword) == false)
                            {
                                ModelState.AddModelError(nameof(model.MasterPassword), StringResources.IncorrectPassword);
                                return(View(model));
                            }

                            var vault = vaultRepository.GetVault(currentVaultName, oldPassword);
                            vaultRepository.SaveVault(vault, newPassword);
                            SessionContext.SetMasterPassword(newPassword);
                            return(RedirectToAction("Index", "VaultExplorer"));
                        }
                }
                else
                {
                    return(View(model));
                }
            }
            finally
            {
                SyncContext.Release();
            }
        }
        public IActionResult ChangePassword()
        {
            var model = new VaultChangePasswordViewModel()
            {
                VaultName = this.SessionContext.GetCurrentVaultName()
            };

            return(View(model));
        }