Show Table of Contents
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);
});
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.