![]() |
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) Example: Crypt2.DecryptStringENC methodDemonstrates how to call the DecryptStringENC method.
integer li_rc oleobject loo_Crypt string ls_EncodedEncrypted string ls_OriginalText // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Crypt = create oleobject li_rc = loo_Crypt.ConnectToNewObject("Chilkat.Crypt2") if li_rc < 0 then destroy loo_Crypt MessageBox("Error","Connecting to COM object failed") return end if loo_Crypt.CryptAlgorithm = "aes" loo_Crypt.CipherMode = "cbc" loo_Crypt.KeyLength = 128 loo_Crypt.SetEncodedKey("000102030405060708090A0B0C0D0E0F","hex") loo_Crypt.SetEncodedIV("000102030405060708090A0B0C0D0E0F","hex") loo_Crypt.EncodingMode = "base64" // Return the base64 encoded encrypted bytes ls_EncodedEncrypted = loo_Crypt.EncryptStringENC("Hello World!") Write-Debug "Encrypted: " + ls_EncodedEncrypted // Output: // Encrypted: qiq+IFhcjTkEIkZyf31V/g== // Decrypt ls_OriginalText = loo_Crypt.DecryptStringENC(ls_EncodedEncrypted) Write-Debug "Decrypted: " + ls_OriginalText // Output: // Decrypted: Hello World! destroy loo_Crypt |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.