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) UU Encoding and DecodingDemonstrates how to UU encode and decode.
Use ChilkatAx-win32.pkg Procedure Test Handle hoCrypt String sS1 String sS2 String sS3 2 Handle hoCrypt2 String sTemp1 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt If (Not(IsComObjectCreated(hoCrypt))) Begin Send CreateComObject of hoCrypt End Move "This string is to be UU encoded" To sS1 Set ComUuMode Of hoCrypt To "666" Set ComUuFilename Of hoCrypt To "something.txt" // UU encode: Get ComEncodeString Of hoCrypt sS1 "ansi" "uu" To sS2 // Note: Call crypt.Encode instead of crypt.EncodeString // to UU encode binary bytes (i.e. non-text binary data). Showln sS2 // UU decode: Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt2 If (Not(IsComObjectCreated(hoCrypt2))) Begin Send CreateComObject of hoCrypt2 End Get ComDecodeString Of hoCrypt2 sS2 "ansi" "uu" To sS3 // Note: Likewise, call crypt.Decode to decode non-text binary data. Showln sS3 // Show the file permissions mode and filename found // in the UU encoded data: Get ComUuMode Of hoCrypt2 To sTemp1 Showln "UuMode = " sTemp1 Get ComUuFilename Of hoCrypt2 To sTemp1 Showln "UuFilename = " sTemp1 End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.