1
I have an application in Java and using the Postgresql database. To connect to the database I use this method:
public static Connection getConnection() throws Exception {
try {
Class.forName("org.postgresql.Driver");
Connection connection = DriverManager.getConnection(Constantes.URL_BD, Constantes.USUARIO_BD, Constantes.SENHA_BD);
return connection;
} catch (Exception e) {
throw new Exception(e.getMessage());
}
}
I wonder if when passing the password to the getConnection() method of Drivermanager it may be encrypted in some way... whether using md5 or other hash.
Why do you want this result? Let’s try to treat the reason why.
– juniorb2ss
I want to do this in case someone gets access to my application, whether by source code or reverse engineering can’t read the password
– Andre
Your application is Desktop communicating with a remote database?
– Jefferson Quesado
This run by command line . jar
– Andre
How do you use the bank? Is it feasible to separate in this CLI front-end and a service that communicates with the bank? (Service located in a controlled environment)
– Jefferson Quesado