title: Generate a short code based on a unique string in C#
body: <p>I'm just about to launch the beta of a new online service. Beta subscribers will be sent a unique "access code" that allows them to register for the service.</p>
  
  <p>Rather than storing a list of access codes, I thought I would just generate a code based on their email, since this itself is unique.</p>
  
  <p>My initial thought was to combine the email with a unique string and then <a href="http://en.wikipedia.org/wiki/Base64" rel="nofollow">Base64</a> encode it. However, I was looking for codes that are a bit shorter, say 5 digits long.</p>