title: Generate unique hash from filename
body: <p>I'm looking to generate a unique random hash that has a miniscule chance of being duplicated. It should only contain numbers, and I want it to be 4 characters long. I have the file path in the form of </p>
  
  <pre><code>filepath = "c:\\users\\john\\filename.csv"
  </code></pre>
  
  <p>Now, I'd like to only select the "filename" part of that string and create a hash from that filename, though I want it to be different each time so if two users upload a similarly named file it will likely generate a different hash code. What's the best way to go about doing this?</p>
  
  <p>I will be using this hash to append "001", "002", etc. on to create student IDs. </p>