title: Calculate a checksum for a string
body: <p>I got a string of an arbitrary length (lets say 5 to 2000 characters) which I would like to calculate a checksum for.</p>
  
  <p>Requirements</p>
  
  <ul>
  <li>The same checksum must be returned each time a calculation is done for a string</li>
  <li>The checksum must be unique (no collisions)</li>
  <li>I can not store previous IDs to check for collisions</li>
  </ul>
  
  <p>Which algorithm should I use?</p>
  
  <p><strong>Update:</strong> </p>
  
  <ul>
  <li>Are there an approach which is reasonable unique? i.e. the likelihood of a collision is very small.</li>
  <li>The checksum should be alphanumeric</li>
  <li>The strings are unicode</li>
  <li>The strings are actually texts that should be translated and the checksum is stored with each translation (so a translated text can be matched back to the original text).</li>
  <li>The length of the checksum is not important for me (the shorter, the better)</li>
  </ul>
  
  <p><strong>Update2</strong></p>
  
  <p>Let's say that I got the following string <code>"Welcome to this website. Navigate using the flashy but useless menu above"</code>. </p>
  
  <p>The string is used in a view in a similar way to <code>gettext</code> in linux. i.e. the user just writes (in a razor view)</p>
  
  <pre><code>@T("Welcome to this website. Navigate using the flashy but useless menu above")
  </code></pre>
  
  <p>Now I need a way to identity that string so that I can fetch it from a data source (there are several implementations of the data source). Having to use the entire string as a key seems a bit inefficient and I'm therefore looking for a way to generate a key out of it. </p>