title: Creating an id from name and address data. Hash/Digest
body: <p>My problem:</p>
  
  <p>I'm looking for a way to represent a person's name and address as an encoded id.  The id should contain only alpha-numeric characters, be collision-proof, and be represented in a smallest number of characters possible.  My first thought was to simply use a cryptographic hash function like MD5 or SHA1, but this seems like overkill (security isn't important - doesn't need to be one-way) and I'd prefer to find something that would produce a shorter id.  Does anyone know of an existing algorithm that fits this problem?</p>
  
  <p>In other words, what is the best way to implement the following function so that the return value is the same consistently for the same input, collisions are unlikely, and ids are less than 20 characters?</p>
  
  <pre><code>&gt;&gt;&gt; make_fake_id(fname = 'Oscar', lname = 'Grouch', stnum = '1', stname = 'Sesame', zip = '12345')
  N1743123734
  </code></pre>
  
  <p>Application Context (for those that are interested):</p>
  
  <p>This will be used for a <a href="http://en.wikipedia.org/wiki/Record_linkage_problem" rel="nofollow noreferrer">record linkage app</a>. Given an input name and address we search a very large database for the best match and return the database id and other data (how we do this is not important here). If there isn't a match I need to generate this psuedo/generated/derived id from the search input (entity's name and address data). Every search record should result in an output record with either a real (the actual database id resulting from a match/link) or this generated psuedo/generated/derived id. The psuedo id will be prefixed with a character (e.g. N) to differentiate it from a real id.</p>