Node.js
Node.js
Transition from Crypt2.GetDecryptCert to Crypt2.LastDecryptCert
Provides instructions for replacing deprecated GetDecryptCert method calls with LastDecryptCert.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var crypt2 = new chilkat.Crypt2();
// ...
// ...
// ------------------------------------------------------------------------
// The GetDecryptCert method is deprecated:
// certObj: Cert
var certObj = crypt2.GetDecryptCert();
if (crypt2.LastMethodSuccess == false) {
console.log(crypt2.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using LastDecryptCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
var certOut = new chilkat.Cert();
success = crypt2.LastDecryptCert(certOut);
if (success == false) {
console.log(crypt2.LastErrorText);
return;
}
}
chilkatExample();