![]() |
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.EncryptEncoded methodDemonstrates how to call the EncryptEncoded method.
integer li_rc oleobject loo_Crypt string ls_Encrypted string ls_Decrypted 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") // Encrypt the bytes 0x00, 0x01, 0x02, ... 0x0A // and return the encrypted bytes using the lowercase hex encoding. loo_Crypt.EncodingMode = "hex_lower" ls_Encrypted = loo_Crypt.EncryptEncoded("000102030405060708090a") Write-Debug ls_Encrypted // Output: // 9da2ae71a5378487114b430e5e230378 ls_Decrypted = loo_Crypt.DecryptEncoded(ls_Encrypted) Write-Debug ls_Decrypted // Output: // 000102030405060708090a destroy loo_Crypt |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.