第4章 $fh.hash

$fh.hash(options, callback)

特定入力のハッシュ値を生成します。

4.1. 例

var options = {
  "algorithm": 'SHA256', // Possible values: MD5 | SHA1 | SHA256 | SHA512
  "text": 'Need more widgets'
};
$fh.hash(options, function (err, result) {
  if (err) {
    return console.error("Failed to generate hash value: " + err);
  } else {
    return console.log("Hash value is :" + result.hashvalue);
  }
});