Click here to Skip to main content
15,885,944 members
Articles / Desktop Programming / WPF

Passwords in WPF: How to find yours and how to prevent it being found

Rate me:
Please Sign up or sign in to vote.
4.21/5 (23 votes)
23 Nov 2008CPOL4 min read 77.7K   985   31  
How I can find your password and how to prevent it.
using System.Windows;

namespace SecureWpfLogOn
{
    /// <summary>
    /// Interaction logic for SecurePasswordBoxExample.xaml
    /// </summary>
    public partial class SecurePasswordBoxExample : Window
    {
        public SecurePasswordBoxExample()
        {
            InitializeComponent();
            securePasswordBox1.Text = "ciaobello";
        }

        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("You have inserted \"" + securePasswordBox1.Text + "\" password");
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Other
Italy Italy
Software Researcher at the University of Parma (Italy)

Comments and Discussions