title: Generating a fake ISBN from book title? (Or: How to hash a string into a 6-digit numeric ID)
body: <p>Short version: <strong>How can I turn an arbitrary string into a 6-digit number with minimal collisions?</strong></p>
  
  <p>Long version:</p>
  
  <p>I'm working with a small library that has a bunch of books with no ISBNs. These are usually older, out-of-print titles from tiny publishers that never got an ISBN to begin with, and I'd like to generate fake ISBNs for them to help with barcode scanning and loans.</p>
  
  <p>Technically, real ISBNs are controlled by commercial entities, but it is possible to use the format to assign numbers that belong to no real publisher (and so shouldn't cause any collisions).</p>
  
  <p>The format is such that:</p>
  
  <pre><code>978-0-01-######-?
  </code></pre>
  
  <p>Gives you 6 digits to work with, from 000000 to 999999, with the ? at the end being a checksum.</p>
  
  <p><strong>Would it be possible to turn an arbitrary book title into a 6-digit number in this scheme with minimal chance of collisions?</strong></p>