![]() |
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
(Visual FoxPro) Example: Crypt2.SetDecryptCert2 methodDemonstrates how to call the SetDecryptCert2 method. This example loads the certificate and private key from PEM files: PEM Format Certificate file ( -----BEGIN CERTIFICATE----- MIID... (base64-encoded data) -----END CERTIFICATE----- Private key file ( -----BEGIN PRIVATE KEY----- MIIE... (base64-encoded data) -----END PRIVATE KEY-----
LOCAL loCert LOCAL lnSuccess LOCAL loPrivKey LOCAL loCrypt loCert = CreateObject('Chilkat.Cert') lnSuccess = loCert.LoadFromFile("c:/certs_and_keys/certAbc.pem") * Assume success... loPrivKey = CreateObject('Chilkat.PrivateKey') lnSuccess = loPrivKey.LoadAnyFormatFile("c:/certs_and_keys/certAbc_key.pem") * Assume success... loCrypt = CreateObject('Chilkat.Crypt2') loCrypt.CryptAlgorithm = "pki" * ... * ... lnSuccess = loCrypt.SetDecryptCert2(loCert,loPrivKey) IF (lnSuccess = 0) THEN ? loCrypt.LastErrorText RELEASE loCert RELEASE loPrivKey RELEASE loCrypt CANCEL ENDIF ? "Success." RELEASE loCert RELEASE loPrivKey RELEASE loCrypt |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.