There is a property for a string input field: Show as password. When you set that property to Yes your input in the field will be shown as: * in stead of the plain text.
And to hide it in the database use the community commons module from the AppStore and encrypt the password to both the attribute you are using now and another attribute when the 2 are different.
And decrypt before using (in memory, no storage in the database!)
Thank you very much