Node.js
Node.js
Workaround for the deprecated Crypt2.Decode method
Shows how to replace the deprecated Decode method. (Chilkat is moving away from the use of CkByteData.)Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var crypt = new chilkat.Crypt2();
var encodedStr = "VGhpcyBpcyBhIHRlc3QgMTIz";
var encoding = "base64";
// ------------------------------------------------------------------------
// The Decode method is deprecated:
outData = crypt.Decode(encodedStr,encoding);
// ------------------------------------------------------------------------
// Workaround.
// (Chilkat is moving away from using CkByteData)
var bd = new chilkat.BinData();
bd.AppendEncoded(encodedStr,encoding);
var pBytes = bd.GetData();
}
chilkatExample();