![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Example: Crypt2.SetDecryptCert methodDemonstrates how to call the SetDecryptCert method.
Use ChilkatAx-win32.pkg Procedure Test Variant vCert Handle hoCert Boolean iSuccess Handle hoDecrypt Variant vBd Handle hoBd String sTemp1 Get Create (RefClass(cComChilkatCert)) To hoCert If (Not(IsComObjectCreated(hoCert))) Begin Send CreateComObject of hoCert End Get ComLoadPfxFile Of hoCert "c:/pfx_files/my.pfx" "password" To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoCert To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatCrypt2)) To hoDecrypt If (Not(IsComObjectCreated(hoDecrypt))) Begin Send CreateComObject of hoDecrypt End Set ComCryptAlgorithm Of hoDecrypt To "pki" Get pvComObject of hoCert to vCert Get ComSetDecryptCert Of hoDecrypt vCert To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoDecrypt To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatBinData)) To hoBd If (Not(IsComObjectCreated(hoBd))) Begin Send CreateComObject of hoBd End Get ComLoadFile Of hoBd "c:/someDir/pkcs7_encrypted.dat" To iSuccess Get pvComObject of hoBd to vBd Get ComDecryptBd Of hoDecrypt vBd To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoDecrypt To sTemp1 Showln sTemp1 Procedure_Return End // bd contains the decrypted content. End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.