Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from CBase:


Construction and destruction


~CASN1EncBase()

IMPORT_C ~CASN1EncBase();

Description


CASN1EncBase(const TTagType,const TASN1Class)

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: IMPORT_C virtual 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()const

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(TDes8 &,TUint &)const

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(const TTagType,const TASN1Class)

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()const

private: virtual TBool IsConstructed() const=0;

Description

Return value

TBool


WriteLengthDER(TDes8 &)const

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(TDes8 &)const

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.