Displaying data stored in a database in asterisk form rather than simple text or character format

I have created an application in visual studio using c#  that stores information entered by user about a device in a database. It includes device name and password field. Now I want that the password field in the database must not be  shown in simple text or character format as entered by the user, instead the values in the password field must be displayed as asterisk (*) .Can someone help me out on how to do this ?
Abhishek ModakStudentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
Abhishek ModakStudentAuthor Commented:
When the user enters a password in a textbox,I have applied the property of Password Char on that textbox,but what I want is that when I see the database where I have stored the DeviceName and password entered by users in the textboxes, the password field in the database must not show the password in plaintext format, instead the password must be shown as asterisk form. Can you tell me how to apply password char property to the password field data stored in the database?
Tapan PattanaikSenior EngineerCommented:
Hi Abhishek,

For encrypting passwords we can  use one-way hashing algorithms and these algorithms map the input value to encrypted output and for the same input it generates the same output text. For more details, Please check the link.

Here is example how to Storing passwords in a secure way in a SQL Server database.

https://www.mssqltips.com/sqlservertip/4037/storing-passwords-in-a-secure-way-in-a-sql-server-database/

Here is a another way to stored the password in sql server.

you can use hashing technique in CSharp (C#) to store the password. :

https://www.codeproject.com/Articles/425150/Beginners-guide-to-a-secure-way-of-storing-password

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Abhishek ModakStudentAuthor Commented:
Thanks for your help!
Abhishek ModakStudentAuthor Commented:
I now want to deploy my developed application to other devices as well as a setup file..I want to also add the database file in .mdf format in the setup file..but when I try to do it using install shield software,the application fails to create the database in the other system..what might be the reason for it? Please help me out!IMG_20180327_132807.jpg
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.