![]() |
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.EncodeString methodDemonstrates how to call the EncodeString method.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCrypt String s String sTemp1 Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt If (Not(IsComObjectCreated(hoCrypt))) Begin Send CreateComObject of hoCrypt End Move "Hello World" To s Get ComEncodeString Of hoCrypt s "utf-8" "hex" To sTemp1 Showln sTemp1 // Output: 48656C6C6F20576F726C64 Get ComEncodeString Of hoCrypt s "utf-16" "hex" To sTemp1 Showln sTemp1 // Output: 480065006C006C006F00200057006F0072006C006400 Get ComEncodeString Of hoCrypt s "utf-8" "base64" To sTemp1 Showln sTemp1 // Output: SGVsbG8gV29ybGQ= Move "électricité" To s Get ComEncodeString Of hoCrypt s "utf-8" "hex" To sTemp1 Showln sTemp1 // Output: C3A96C6563747269636974C3A9 Get ComEncodeString Of hoCrypt s "windows-1252" "hex" To sTemp1 Showln sTemp1 // Output: E96C6563747269636974E9 Get ComEncodeString Of hoCrypt s "windows-1252" "hex_lower" To sTemp1 Showln sTemp1 // Output: e96c6563747269636974e9 Get ComEncodeString Of hoCrypt s "utf-8" "url" To sTemp1 Showln sTemp1 // Output: %C3%A9lectricit%C3%A9 End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.