![]() |
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) Example: Crypt2.EncryptEncoded methodDemonstrates how to call the EncryptEncoded method.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCrypt String sEncrypted String sDecrypted Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt If (Not(IsComObjectCreated(hoCrypt))) Begin Send CreateComObject of hoCrypt End Set ComCryptAlgorithm Of hoCrypt To "aes" Set ComCipherMode Of hoCrypt To "cbc" Set ComKeyLength Of hoCrypt To 128 Send ComSetEncodedKey To hoCrypt "000102030405060708090A0B0C0D0E0F" "hex" Send ComSetEncodedIV To hoCrypt "000102030405060708090A0B0C0D0E0F" "hex" // Encrypt the bytes 0x00, 0x01, 0x02, ... 0x0A // and return the encrypted bytes using the lowercase hex encoding. Set ComEncodingMode Of hoCrypt To "hex_lower" Get ComEncryptEncoded Of hoCrypt "000102030405060708090a" To sEncrypted Showln sEncrypted // Output: // 9da2ae71a5378487114b430e5e230378 Get ComDecryptEncoded Of hoCrypt sEncrypted To sDecrypted Showln sDecrypted // Output: // 000102030405060708090a End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.