title: How to generate and validate a software license key?
body: <p>I'm currently involved in developing a product (developed in C#) that'll be available for downloading and installing for free but in a very limited version. To get access to all the features the user has to pay a license fee and receive a key. That key will then be entered into the application to "unlock" the full version.</p>
  
  <p>As using a license key like that is kind of usual I'm wondering :  </p>
  
  <ol>
  <li>How's that usually solved?</li>
  <li>How can I generate the key and how can it be validated by the application?</li>
  <li>How can I also avoid having a key getting published on the Internet and used by others that haven't paid the license (a key that basically isn't "theirs"). </li>
  </ol>
  
  <p>I guess I should also tie the key to the version of application somehow so it'll be possible to charge for new keys in feature versions.</p>
  
  <p>Anything else I should think about in this scenario?</p>