I think the most important thing is to store the password outside your web root folder.
Also, I really don't see what else you can do; if people get access to the folders where the scripts are stored, they also have access to the code that decrypts / retrieves the password, so no matter how good the encryption is, the password will be available. If I didnβt miss something ...
source share