if the pasword you want to encrypt is the password to the DB for the connection... then MD5 is not the way to go. MD5 is a ONE WAY encryption method. What you may want to consider it writting your own encryption method of some kind to scramble the passsword, then un-do it when you want to connect to the DB.

If what you are doing is encrypting a password to be stored in the DB, then MD5 can work. It works like this: User enters their password (this would be like when they are signing up), encrypt it using MD5 and store the result in the database. Then when ever the user loggs in, they type their password in, it gets encrypted using MD5 then you can use that result to compare against the stored value (which was previously encrypted using MD5)....