title: how to use nodejs crypto module in javascript
body: <p>Is there any way i can use nodejs "crypto" module in javascript without actually using node.</p>
  
  <p>Or is there any similar javascript library that does all the things that "crypto" does </p>
  
  <p>Like i neeed the below code in javascript with the help of nodejs</p>
  
  <pre><code>  var crypto = require('crypto'),
       hash = crypto.createHash('sha256'),
       hmac = crypto.createHmac('sha256', someKey);
  </code></pre>
  
  <p><strong>basically i need to replicate below in javascript without using node at all</strong>   </p>
  
  <pre><code>var bytesToSign = hash.update(stringToSign).digest();
  </code></pre>