第6章 $fh.hash

$fh.hash(options, success, failure);

文字列のハッシュ値を生成します。

サポートされるプラットフォーム

  • JavaScript SDK

    • Cordova
    • Web Apps

詳細なバージョン情報については、Supported Configurations (英語) を参照してください。

6.1. 例

var options = {
  "algorithm": "SHA256", // Can be MD5 | SHA1 | SHA256 | SHA512
  "text": "Need more widgets. Add some columns." // Text to hash
};

$fh.hash(options, function (res) {
  // The generated hash value
  var hashvalue = res.hashvalue;
}, function(msg) {
  // Error message for why the hash failed
  console.error(msg);
});