Encrypted User credentials for Database Connection

Can we use encrypted User ID and password for database connection?