Chapter 6. $fh.hash

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

Generate hash value of a string.

Supported Platforms

  • JavaScript SDK

    • Cordova
    • Web Apps

For detailed version information, see Supported Configurations.

6.1. Example

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);
});