|  | 
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) Load PFX/P12 from a Base64 Encoded PFX FileDemonstrates how to call LoadPfxEncoded. 
 Use ChilkatAx-win32.pkg Procedure Test Handle hoBd Boolean iSuccess String sStrBase64 Handle hoPfx String sPassword String sTemp1 Get Create (RefClass(cComChilkatBinData)) To hoBd If (Not(IsComObjectCreated(hoBd))) Begin Send CreateComObject of hoBd End Get ComLoadFile Of hoBd "qa_data/pfx/cert_test123.pfx" To iSuccess If (iSuccess <> True) Begin Showln "Failed to load PFX file." Procedure_Return End // Get the bytes contained in the PFX in base64 format: Get ComGetEncoded Of hoBd "base64" To sStrBase64 // The base64 looks like this: "MIIbEAIBAzCCGswGCSqGSIb3DQEHAaCCGr0Eghq5MIIatTCCBg..." Showln sStrBase64 Get Create (RefClass(cComChilkatPfx)) To hoPfx If (Not(IsComObjectCreated(hoPfx))) Begin Send CreateComObject of hoPfx End // Load the PFX from the base64 string Move "test123" To sPassword Get ComLoadPfxEncoded Of hoPfx sStrBase64 "base64" sPassword To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoPfx To sTemp1 Showln sTemp1 Procedure_Return End Showln "success" End_Procedure | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.