![]() |
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
(Lianja) 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-----
loCert = createobject("CkCert") llSuccess = loCert.LoadFromFile("c:/certs_and_keys/certAbc.pem") // Assume success... loPrivKey = createobject("CkPrivateKey") llSuccess = loPrivKey.LoadAnyFormatFile("c:/certs_and_keys/certAbc_key.pem") // Assume success... loCrypt = createobject("CkCrypt2") loCrypt.CryptAlgorithm = "pki" // ... // ... llSuccess = loCrypt.SetDecryptCert2(loCert,loPrivKey) if (llSuccess = .F.) then ? loCrypt.LastErrorText release loCert release loPrivKey release loCrypt return endif ? "Success." release loCert release loPrivKey release loCrypt |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.