The validation/verification of a product-key must be completly offline. The ability to black-list keys has been made very dynamic wherein it can be done in an online/offline manor. The generated keys will have hyphens (dashes) inserted separating the key into groups of characters.
This design is commonly known as a Partial Key Verification System. The basic idea behind this product-key generator is that not all of the encoding/decoding logic is included in the client-installed application binary files. I just ported this example to Java as that's what I now use everyday. This example caught my eye since pascal/Delphi was my first encounter with programming. This code has been based off of an example article found at: A simple but powerful product-key generator written in Java.