0
在我的程序中,我提示用戶輸入用戶名和密碼,我使用passwordField
來防止人們看着屏幕看到它。現在,當我使用密碼連接到數據庫時,應該使用什麼?使用passwordField連接到mySQL
java.sql.Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/database", username.getText(), passwordField.getText());
1).getText()
的作品,但它的過時
2).getPassword().toString()
這可能同.getText()
只是不再Otherway?
我不認爲任何VITAL信息可能會丟失使用我的程序,但仍然希望做正確的方式(或理解爲什麼)。我認爲MD5是讓人們嗅探交流的最佳方式。