Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: asn1enc.h
Link against: asn1.lib

Class CASN1EncBase

class CASN1EncBase : public CBase;

Description

Base class for all ASN.1 types that we can encode.

Derivation

Members

Defined in CASN1EncBase:
CASN1EncBase(), CalculateContentsLengthDER(), ConstructL(), IsConstructed(), LengthDER(), SetTag(), WriteContentsDERL(), WriteDERL(), WriteLengthDER(), iContentsLengthDER, iLengthLengthDER, iTagLengthDER, ~CASN1EncBase()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CASN1EncBase()

IMPORT_C ~CASN1EncBase();

Description


CASN1EncBase()

protected: IMPORT_C CASN1EncBase(const TTagType aType, const TASN1Class aClass);

Description

Protected constructor

Parameters

const TTagType aType

Tag type of the new object

const TASN1Class aClass

Tag class of the new object.


ConstructL()

protected: virtual IMPORT_C void ConstructL();

Description

Must call this version from derived classes in their ConstructL, but only once they're ready to have CalculateContentsLengthDER called on them.

[Top]


Member functions


LengthDER()

IMPORT_C TUint LengthDER() const;

Description

Gives total number of octets in the DER encoding of this object.

Return value

TUint

Number of octets in DER encoding of this object.


WriteDERL()

IMPORT_C void WriteDERL(TDes8 &aBuf, TUint &aPos) const;

Description

Writes entire DER encoding of this object into the given buffer.

Parameters

TDes8 &aBuf

Buffer receiving the encoding.

TUint &aPos

Position to start writing at.


SetTag()

IMPORT_C void SetTag(const TTagType aType, const TASN1Class aClass=EContextSpecific);

Description

Sets tag type/class of the encoding object

Parameters

const TTagType aType

Tag type to set

const TASN1Class aClass

Tag class to set.


CalculateContentsLengthDER()

private: virtual void CalculateContentsLengthDER()=0;

Description

Calculates number of octets in DER content encoding. Must set value of the appropriate data member.


IsConstructed()

private: virtual TBool IsConstructed() const=0;

Description

Return value

TBool


WriteLengthDER()

private: virtual void WriteLengthDER(TDes8 &aBuf) const;

Description

Writes DER length encoding into supplied buffer, which is already verified to be big enough.

Parameters

TDes8 &aBuf

Buffer to write to.


WriteContentsDERL()

private: virtual void WriteContentsDERL(TDes8 &aBuf) const=0;

Description

Writes DER content encoding into supplied buffer, which is already verified to be big enough. Must be implemented by derived classes.

Parameters

TDes8 &aBuf

Buffer to write to.

[Top]


Member data


iTagLengthDER

protected: TUint iTagLengthDER;

Description

Length of DER encoded tag.


iLengthLengthDER

protected: TUint iLengthLengthDER;

Description

Length of DER encoded length.


iContentsLengthDER

protected: TUint iContentsLengthDER;

Description

Length of DER encoded content.