TBase64 Class Reference

class TBase64

Base64 encoding and decoding class.

Public Member Functions
TBase64()
IMPORT_C TBoolDecode(const TDesC8 &, TDes8 &)
IMPORT_C TIntEncode(const TDesC8 &, TDes8 &)
IMPORT_C TIntPortableEncode(const TDesC8 &, TDes8 &, TInt)
Private Member Enumerations
enumanonymous { EPadChar = 64 }
enumEMaskShiftValues { ESix = 6, EFour = 4, ETwo = 2, EZero = 0 }
enumEMaskValues { ESixBitMask = 0x3F, EEightBitMask = 0xFF }
Private Attributes
TInt iMaskShiftStored
TInt iShiftStored

Constructor & Destructor Documentation

TBase64()

IMPORT_CTBase64()

TBase64 constructor

Member Functions Documentation

Decode(const TDesC8 &, TDes8 &)

IMPORT_C TBoolDecode(const TDesC8 &aSrcString,
TDes8 &rDestString
)

Decodes the Base64 string to ASCII pattern.

Parameters

const TDesC8 & aSrcStringThe source string in Base64 codeset.
TDes8 & rDestStringThe destination string with converted ASCII code values.

Encode(const TDesC8 &, TDes8 &)

IMPORT_C TIntEncode(const TDesC8 &aSrcString,
TDes8 &rDestString
)

Encodes an ASCII string to Base64 string.

Parameters

const TDesC8 & aSrcStringThe source string in ASCII code.
TDes8 & rDestStringThe destination string with converted base64 values.

PortableEncode(const TDesC8 &, TDes8 &, TInt)

IMPORT_C TIntPortableEncode(const TDesC8 &aSrcString,
TDes8 &aDestString,
TIntaLineLength = -1
)

Encodes an ASCII string to Base64 string.

Parameters

const TDesC8 & aSrcStringThe source string in ASCII.
TDes8 & aDestStringThe destination string with converted base64 values.
TInt aLineLength = -1The 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]