Exemple #1
0
        static SecureString GetKeyPassword(string keyId, string userId)
        {
            PasswordForm form = new PasswordForm();

            form.DescriptionText = "A password is needed to unlock the secret key for " + userId;
            return(form.ShowDialog() == DialogResult.OK ? form.GetPassword() : null);
        }
Exemple #2
0
        static SecureString GetDecryptionPassword()
        {
            PasswordForm form = new PasswordForm();

            form.DescriptionText = "This data is encrypted with a password. Enter the password to decrypt the data.";
            return(form.ShowDialog() == DialogResult.OK ? form.GetPassword() : null);
        }