Exactly against which attack scenario are you trying to defend yourself? I'm going to answer making some assumptions, please correct if I'm wrong.
If you want to protect the configuration file, then you are trying to defend against an attacker who has already gained read access to your server files. In this scenario, this attacker may as well download the program itself and extract the key with a debugger, as it is hardcoded. It is an extra layer of defense, that could make some attackers give up, but will only delay others.
Hope it helps.