×
Namespaces

Variants
Actions
Revision as of 05:24, 16 November 2011 by hamishwillee (Talk | contribs)

Base64 Encoding and Decoding

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: User:Kanu123 (29 Jun 2007)
Last edited: hamishwillee (16 Nov 2011)

It sometimes happen when writing connected application that you need to manipulate data in Base64, Quoted Printable or UU format. This is fairly easy with Symbian OS as three simple classes, all derivating from TImCodec, will do the job for you:

  • TImCodecB64 for Base64,
  • TImCodecQP for Quoted-Printable,
  • TImCodecUU for UU format.

Header file.

#include <imcvcodc.h>

MMP file.

LIBRARY   imut.lib

Their usage is similar and fairly simple:

void DoBase64Encoding(const TDesC8& aSourceData, TDes8& aEncodedData)
{
TImCodecB64 b64enc;
b64enc.Initialise();
b64enc.Encode(aSourceData,aEncodedData);
}


Source of the contribution on NewLC

83 page views in the last 30 days.
×