I'm wanting to have my program have a Activation Key, like a HashCode, tied into a couple of settings.

For example I had the thought of taking the two Settings and making a string from then using md5() on that and that would be the Activation Key. The problem is that I'd have to have in the program the code to actually generate the whole Key anyway in order to compare the one they give with it. And then someone could extract this given time and effort.
I'll go with that if I can't find a better way but I was hoping to be able to find a way in which my algorythum used to verify could do so without creating a new key.