Sample code for 30+ languages & platforms
JavaScript

Example: SecureString.HashVal method

Demonstrates the HashVal method.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat v11.4.0 or greater.
JavaScript
var success = false;

var str = new CkSecureString();
str.MaintainHash = "sha256";
str.Append("Hello World");

var encodedHash = str.HashVal("base64");
console.log(encodedHash);