Sample code for 30+ languages & platforms
Xbase++ Requires Chilkat v11.0.0+

Transition from Crypt2.GetDecryptCert to Crypt2.LastDecryptCert

Provides instructions for replacing deprecated GetDecryptCert method calls with LastDecryptCert.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oCrypt2
LOCAL oCertObj
LOCAL oCertOut

nSuccess := 0

oCrypt2 := CreateObject("Chilkat.Crypt2")

//  ...
//  ...

//  ------------------------------------------------------------------------
//  The GetDecryptCert method is deprecated:

oCertObj := oCrypt2:GetDecryptCert()
IF (oCrypt2:LastMethodSuccess == 0)
    ? oCrypt2:LastErrorText
    oCrypt2:destroy()
    RETURN
ENDIF

//  ...
//  ...

oCertObj:destroy()

//  ------------------------------------------------------------------------
//  Do the equivalent using LastDecryptCert.
//  Your application creates a new, empty Cert object which is passed 
//  in the last argument and filled upon success.

oCertOut := CreateObject("Chilkat.Cert")
nSuccess := oCrypt2:LastDecryptCert(oCertOut)
IF (nSuccess == 0)
    ? oCrypt2:LastErrorText
    oCrypt2:destroy()
    oCertOut:destroy()
    RETURN
ENDIF

oCrypt2:destroy()
oCertOut:destroy()