title: How do I hash a string using JavaScript with sha512 algorithm
body: <p>I've tried using sha512 from NPM but it keeps hashing the wrong thing i.e I am supposed to get a string but it keeps returning object.
  So in PHP I know I can perform the task <code>$hash = hash("sha512","my string for hashing");</code></p>
  
  <p>How do I perform this task on nodejs JavaScript</p>