one of the project required me to encrypt DB connection string (username & password).
Usually I use .htaccess to restrict user to access from web. But this pro
consider to store your credentials in any cloud service provider using key vault