title: Node.js: Is creating an MD5 hash with Crypto module fully asynchronous?
body: <p>Considering this piece of code in a Node 11 environment and using the standard crypto module, I have two questions (and just to avoid any misunderstandings: I am simply calculating an MD5 hash based on a string - no encryption, no sensitive data): </p>
  
  <pre><code>exports.calculateSomeHash = function(somestring, cb){
      var somehash = crypto.createHash('md5').update(somestring).digest('hex').toString();
      cb(null, somehash);   
  };
  </code></pre>
  
  <p>1) Could calculateSomeHash() ever return an empty (somehash) value as the hash calculation may perhaps not be fully completed as soon as the callback is fired? </p>
  
  <p>2) Is this hashing algorithm of Node's crypto module fully asynchronous and non-blocking? If not, any recommendations on what to use alternatively? What about e.g.<a href="https://www.npmjs.com/package/hasha" rel="nofollow noreferrer">Hasha</a>?</p>