Don't use comparisons.
In university we had many courses ranging from low level network protocols, databases, artificial intelligence, many languages including Pascal, C++ and assembler, but nothing about how to secure your applications. So what I did was just using the user's personal information to create a hash, which was truncated and became a key. The user would fill in their personal information and key, and this key was checked against the key computed from the filled-in information. Of course this was very easy to defeat. One just had to locate the if test (JMP instruction) and replace it with a no operation (NOP instruction), which would make it skip the test. (A program that is tailored to do such specific change in the binary code is often called a crack). Another way to defeat it was just looking at the instructions, and copying what it did into a new program where a user can fill in his own credentials (such program would be called a keygen or key generator).
Don’t think they can’t read your code.
Many developers create extensive copy protection mechanisms without realizing that potential crackers can read their code. It is not because you ship a binary, that your program becomes unreadable. I told a colleague this a few years ago. He was working on an application which was still in private testing, and to avoid having guest users spread it, he built in some simple protection. The protection in this case was to compare the MAC addresses of the network cards inside the computer it was running on with a list of addresses compiled into the program. I told him several ways how people would circumvent it. As stated previously, they could simply remove the comparison. But they could also make it work without ever modifying the program. Since the list was inside the exe, they could read it, and they could just clone one of the MAC addresses from the list to their network card, or even use a virtual card with the correct MAC address. This list was easy to find, since the comparisons referred to the memory address the list resided at.Encryption is not the magical answer.
You can stall them, but you can't win.
Do not anger your users.