JavaScript
JavaScript
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString 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.
var crypt2 = new CkCrypt2();
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
var encodedStr = "SGVsbG8gV29ybGQ=";
var encoding = "base64";
var charset = "utf-8";
var str = crypt2.DecodeString(encodedStr,charset,encoding);
console.log(str);
// Output is "Hello World"