Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Use Base64 RSA Key to EncryptLoads a Base64 RSA key and uses it to encrypt a string, returning the result in base64.
Use ChilkatAx-win32.pkg Procedure Test Variant vPubkey Handle hoPubkey Boolean iSuccess Handle hoRsa String sEncryptedStr String sTemp1 // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatPublicKey)) To hoPubkey If (Not(IsComObjectCreated(hoPubkey))) Begin Send CreateComObject of hoPubkey End Get ComLoadBase64 Of hoPubkey "MIICdgIBADA ... A9PXLk+j5A==" To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoPubkey To sTemp1 Showln sTemp1 Procedure_Return End Get Create (RefClass(cComChilkatRsa)) To hoRsa If (Not(IsComObjectCreated(hoRsa))) Begin Send CreateComObject of hoRsa End Get pvComObject of hoPubkey to vPubkey Get ComImportPublicKeyObj Of hoRsa vPubkey To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoRsa To sTemp1 Showln sTemp1 Procedure_Return End Set ComEncodingMode Of hoRsa To "base64" Get ComEncryptStringENC Of hoRsa "12345678" False To sEncryptedStr Showln sEncryptedStr End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.