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

Workaround for the deprecated Crypt2.AddPfxSourceData method

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

Chilkat CkPython Downloads

CkPython
import chilkat

success = False

crypt = chilkat.CkCrypt2()

path = "c:/data/example.pfx"
pfxPassword = "secret"

#  ------------------------------------------------------------------------
#  The AddPfxSourceData method is deprecated:

inData = chilkat.CkByteData()
inData.loadFile(path)

success = crypt.AddPfxSourceData(inData,pfxPassword)

#  ------------------------------------------------------------------------
#  Workaround.
#  (Chilkat is moving away from using CkByteData)
bdIn = chilkat.CkBinData()
bdIn.LoadFile(path)

success = crypt.AddPfxSourceBd(bdIn,pfxPassword)