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) RSA Import Private KeySee more RSA ExamplesShows how to select/import a private key for RSA signing or decryption.
Use ChilkatAx-win32.pkg Procedure Test Variant vPrivKey Handle hoPrivKey String sPassword Boolean iSuccess Handle hoRsa String sTemp1 Get Create (RefClass(cComChilkatPrivateKey)) To hoPrivKey If (Not(IsComObjectCreated(hoPrivKey))) Begin Send CreateComObject of hoPrivKey End Move "secret" To sPassword // In all Chilkat methods expecting a path, you pass either absolute or relative paths. Get ComLoadAnyFormatFile Of hoPrivKey "rsaKeys/myTestRsaPrivate.pem" sPassword To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoPrivKey To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatRsa)) To hoRsa If (Not(IsComObjectCreated(hoRsa))) Begin Send CreateComObject of hoRsa End // Tell the RSA object to use the private key (i.e. import the private key) Get pvComObject of hoPrivKey to vPrivKey Get ComImportPrivateKeyObj Of hoRsa vPrivKey To iSuccess End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.