(PureBasic) Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile method.
IncludeFile "CkCrypt2.pb"
Procedure ChilkatExample()
crypt.i = CkCrypt2::ckCreate()
If crypt.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success.i = 0
; Do public-key decryption (RSA)
CkCrypt2::setCkCryptAlgorithm(crypt, "pki")
; ...
; ...
; ...
pfxPath.s = "c:/my_pfx_files/a.pfx"
pfxPassword.s = "secret1"
success = CkCrypt2::ckAddPfxSourceFile(crypt,pfxPath,pfxPassword)
If success = 0
Debug CkCrypt2::ckLastErrorText(crypt)
CkCrypt2::ckDispose(crypt)
ProcedureReturn
EndIf
; Add as many as PFX sources as desired...
pfxPath = "c:/my_pfx_files/b.pfx"
pfxPassword = "secret2"
success = CkCrypt2::ckAddPfxSourceFile(crypt,pfxPath,pfxPassword)
If success = 0
Debug CkCrypt2::ckLastErrorText(crypt)
CkCrypt2::ckDispose(crypt)
ProcedureReturn
EndIf
; ...
; ...
CkCrypt2::ckDispose(crypt)
ProcedureReturn
EndProcedure
|