Sample code for 30+ languages & platforms
Node.js

Workaround for the deprecated Crypt2.OpaqueVerifyBytesENC method

Shows how to replace the deprecated OpaqueVerifyBytesENC method. (Chilkat is moving away from the use of CkByteData.)

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var crypt = new chilkat.Crypt2();

    crypt.EncodingMode = "base64";

    //  ------------------------------------------------------------------------
    //  The OpaqueVerifyBytesENC method is deprecated:

    outData = crypt.OpaqueVerifyBytesENC("base64 encoded p7m");

    //  ------------------------------------------------------------------------
    //  Workaround.
    //  (Chilkat is moving away from using CkByteData)

    var bd = new chilkat.BinData();
    bd.AppendEncoded("base64 encoded p7m","base64");

    //  If the opaque signature is validated, the contents of bd are replaced with the original data that was signed.
    //  
    success = crypt.OpaqueVerifyBd(bd);

}

chilkatExample();