Node.js
Node.js
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var crypt2 = new chilkat.Crypt2();
// 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"
}
chilkatExample();