Beispiel #1
0
        /// <summary>
        /// Method used do decrypt password.
        /// Shows new PasswordWindow and asks for decrypting passPhrase, then shows decrypted password on that window.
        /// </summary>
        /// <param name="encPass"> Encrypted password which needs to be decrypted by user entered passPhrase. </param>
        protected async void DecryptPassAsync(string encPass)
        {
            PasswordWindow passwordWindow = new PasswordWindow(false);

            passwordWindow.ShowAll();
            string passPhrase = await passwordWindow.GetPassword();

            if (string.IsNullOrEmpty(passPhrase))
            {
                return;
            }

            string decrypted = (new Encrypter()).Decrypt(encPass, passPhrase);

            passwordWindow.ShowNonEditableText(decrypted);
        }