TBase64 Class Reference

class TBase64

Base64 encoding and decoding class.

Public Member Functions
TBase64 ()
IMPORT_C TBool Decode (const TDesC8 &, TDes8 &)
IMPORT_C TInt Encode (const TDesC8 &, TDes8 &)
IMPORT_C TInt PortableEncode (const TDesC8 &, TDes8 &, TInt )
Private Member Enumerations
enum anonymous { EPadChar  = 64 }
enum EMaskShiftValues { ESix  = 6, EFour  = 4, ETwo  = 2, EZero  = 0 }
enum EMaskValues { ESixBitMask  = 0x3F, EEightBitMask  = 0xFF }
Private Attributes
TInt iMaskShiftStored
TInt iShiftStored

Constructor & Destructor Documentation

TBase64()

IMPORT_C TBase64 ( )

TBase64 constructor

Member Functions Documentation

Decode(const TDesC8 &, TDes8 &)

IMPORT_C TBool Decode ( const TDesC8 & aSrcString,
TDes8 & rDestString
)

Decodes the Base64 string to ASCII pattern.

Parameters

const TDesC8 & aSrcString The source string in Base64 codeset.
TDes8 & rDestString The destination string with converted ASCII code values.

Encode(const TDesC8 &, TDes8 &)

IMPORT_C TInt Encode ( const TDesC8 & aSrcString,
TDes8 & rDestString
)

Encodes an ASCII string to Base64 string.

Parameters

const TDesC8 & aSrcString The source string in ASCII code.
TDes8 & rDestString The destination string with converted base64 values.

PortableEncode(const TDesC8 &, TDes8 &, TInt)

IMPORT_C TInt PortableEncode ( const TDesC8 & aSrcString,
TDes8 & aDestString,
TInt aLineLength = -1
)

Encodes an ASCII string to Base64 string.

Parameters

const TDesC8 & aSrcString The source string in ASCII.
TDes8 & aDestString The destination string with converted base64 values.
TInt aLineLength = -1 The maximum line length of the encoded base64 values. A CR/LF sequence will be added after these many characters. The default value is -1, which means no CR/LF is added to output. The encoding is compliant with RFC 4648

Member Enumerations Documentation

Enum anonymous

enum base64 coding defines

Enumerators

EPadChar = 64

Padding characters

Enum EMaskShiftValues

enum for EMaskShiftValues

Enumerators

ESix = 6

enum for 6

EFour = 4

enum for 4

ETwo = 2

enum for 2

EZero = 0

enum for 0

Enum EMaskValues

enum for EMaskValues

Enumerators

ESixBitMask = 0x3F

Mask Six bits

EEightBitMask = 0xFF

Mask Eight bits

Member Data Documentation

TInt iMaskShiftStored

TInt iMaskShiftStored [private]

TInt iShiftStored

TInt iShiftStored [private]