String to asterisk, masking password

前端 未结 4 1350
Happy的楠姐
Happy的楠姐 2020-12-21 15:53

I\'m creating this simple login code for an ATM machine. You enter username and password and you logs in, that works just great. Since I\'m not connecting to a database or a

4条回答
  •  自闭症患者
    2020-12-21 16:10

    Michael, have a look at the description on Sun's website: https://web.archive.org/web/20120214061606/http://java.sun.com/developer/technicalArticles/Security/pwordmask

    Or, if you're using Java 5 or newer, you can use this: How to mask a password in Java 5?

提交回复
热议问题