lib/utils.js
function getHash(str, algorithm) {
  algorithm = algorithm || 'md5';
  var hash = crypto.createHash(algorithm);
  hash.end(str);
  return hash.read();
}
function getHash(str, algorithm) {
  algorithm = algorithm || 'md5';
  var hash = crypto.createHash(algorithm);
  hash.end(str);
  return hash.read();
}
function getHash ( str , algorithm ) { algorithm = algorithm || 'md5' ; var hash = crypto . createHash ( algorithm ) ; hash . end ( str ) ; return hash . read ( ) ; }
Compute a string's hash.

@param str {String} The string to hash.
@param algorithm {String} The algorithm used. Defaults to MD5.
Compute a string s hash .