How to hide the database password in the configuration file

I am working on a C ++ project that needs to access a database to read its input.

So far, we have used the default username (postgres) and fixed, clear text password, as well as many other settings in the xml-based configuration file.

Now I need to hide the password from users when I put the configuration file.

FYI: development area is linux, database is postgresql. we would like to provide users with a configuration file for connecting to the database and use it without knowing the password

I will be grateful if you offer a quick and easy link (a little reading material will also be great)

Thank you

+5
source share
3

, , .

:

  • , , ;

  • . , , , - , , , , ..

+6

" " , . , (db_password) , , , db_password . , - , .

+4

We use MD5 to encrypt the password in the configuration file.

-5
source

All Articles