Can we hide a password while a person is typing in a chatbot widget?

Is it possible to encrypt or to make a password hidden while a user is typing in a chatbot widget???..if so how can we do it can anyone give me some ideas how to implement that ???