Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
UU Encoding and DecodingDemonstrates how to UU encode and decode. Downloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries FreeBSD C++ Libraries HP-UX C++ Libraries BlackBerry QNX C++ Libraries // Needs #include <CkCrypt2.h> CkString strOut; CkCrypt2 crypt; // Any string argument automatically begins the 30-day trial. bool success; success = crypt.UnlockComponent("30-day trial"); if (success != true) { strOut.append(crypt.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } const char * s1; const char * s2; const char * s3; s1 = "This string is to be UU encoded"; crypt.put_UuMode("666"); crypt.put_UuFilename("something.txt"); // UU encode: s2 = crypt.encodeString(s1,"ansi","uu"); // Note: Call crypt.Encode instead of crypt.EncodeString // to UU encode binary bytes (i.e. non-text binary data). strOut.append(s2); strOut.append("\r\n"); // UU decode: CkCrypt2 crypt2; s3 = crypt2.decodeString(s2,"ansi","uu"); // Note: Likewise, call crypt.Decode to decode non-text binary data. strOut.append(s3); strOut.append("\r\n"); // Show the file permissions mode and filename found // in the UU encoded data: strOut.append("UuMode = "); strOut.append(crypt2.uuMode()); strOut.append("\r\n"); strOut.append("UuFilename = "); strOut.append(crypt2.uuFilename()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.