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
(PowerBuilder) RSA Import Private KeySee more RSA ExamplesShows how to select/import a private key for RSA signing or decryption.
integer li_rc oleobject loo_PrivKey string ls_Password integer li_Success oleobject loo_Rsa loo_PrivKey = create oleobject // Use "Chilkat_9_5_0.PrivateKey" for versions of Chilkat < 10.0.0 li_rc = loo_PrivKey.ConnectToNewObject("Chilkat.PrivateKey") if li_rc < 0 then destroy loo_PrivKey MessageBox("Error","Connecting to COM object failed") return end if ls_Password = "secret" // In all Chilkat methods expecting a path, you pass either absolute or relative paths. li_Success = loo_PrivKey.LoadAnyFormatFile("rsaKeys/myTestRsaPrivate.pem",ls_Password) if li_Success = 0 then Write-Debug loo_PrivKey.LastErrorText destroy loo_PrivKey return end if loo_Rsa = create oleobject // Use "Chilkat_9_5_0.Rsa" for versions of Chilkat < 10.0.0 li_rc = loo_Rsa.ConnectToNewObject("Chilkat.Rsa") // Tell the RSA object to use the private key (i.e. import the private key) loo_Rsa.ImportPrivateKeyObj(loo_PrivKey) destroy loo_PrivKey destroy loo_Rsa |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.