title: How to generate random SHA1 hash to use as ID in node.js?
body: <p>I am using this line to generate a sha1 id for node.js:</p>
  
  <pre><code>crypto.createHash('sha1').digest('hex');
  </code></pre>
  
  <p>The problem is that it's returning the same id every time.</p>
  
  <p>Is it possible to have it generate a random id each time so I can use it as a database document id?</p>