TSecureFilter Class Reference

class TSecureFilter : public TStreamFilter

Base class used in the derivation of TEncryptFilter and TDecryptFilter .

It has no user accessible functions.

TEncryptFilter TDecryptFilter

Inherits from

Protected Member Functions
TSecureFilter ()
IMPORT_C TInt Capacity ( TInt )
IMPORT_C void DoSynchL ()
TInt EmitL (const TDesC8 &)
IMPORT_C TInt FilterL ( TAny *, TInt , const TUint8 *&, const TUint8 *)
void Set ( MStreamBuf *, TInt )
Private Member Functions
void CompleteL ( TDes8 &, const TDesC8 &)
TInt CryptL ( TDes8 &, const TDesC8 &)
Inherited Functions
MStreamBuf::Close()
MStreamBuf::MStreamBuf()
MStreamBuf::PushL()
MStreamBuf::Read(TDes8 &,TInt,TRequestStatus &)
MStreamBuf::Read(TDes8 &,TRequestStatus &)
MStreamBuf::ReadL(MStreamInput &)
MStreamBuf::ReadL(MStreamInput &,TInt)
MStreamBuf::ReadL(MStreamInput &,TStreamTransfer)
MStreamBuf::ReadL(TAny *,TInt)
MStreamBuf::ReadL(TDes8 &,TInt,TRequestStatus &)
MStreamBuf::ReadL(TDes8 &,TRequestStatus &)
MStreamBuf::Release()
MStreamBuf::SeekL(TMark,TStreamLocation,TInt)
MStreamBuf::SeekL(TMark,TStreamPos)
MStreamBuf::SeekL(TRead,TInt)
MStreamBuf::SeekL(TRead,TStreamLocation,TInt)
MStreamBuf::SeekL(TWrite,TInt)
MStreamBuf::SeekL(TWrite,TStreamLocation,TInt)
MStreamBuf::SizeL()const
MStreamBuf::Synch()
MStreamBuf::SynchL()
MStreamBuf::TellL(TRead)const
MStreamBuf::TellL(TWrite)const
MStreamBuf::Write(const TDesC8 &,TInt,TRequestStatus &)
MStreamBuf::Write(const TDesC8 &,TRequestStatus &)
MStreamBuf::WriteL(MStreamOutput &)
MStreamBuf::WriteL(MStreamOutput &,TInt)
MStreamBuf::WriteL(MStreamOutput &,TStreamTransfer)
MStreamBuf::WriteL(const TAny *,TInt)
MStreamBuf::WriteL(const TDesC8 &,TInt,TRequestStatus &)
MStreamBuf::WriteL(const TDesC8 &,TRequestStatus &)
TStreamFilter::Committed()
TStreamFilter::DoReadL(TAny *,TInt)
TStreamFilter::DoRelease()
TStreamFilter::DoWriteL(const TAny *,TInt)
TStreamFilter::EmitL(const TAny *,TInt)
TStreamFilter::IsCommitted()const
TStreamFilter::TStreamFilter()
Inherited Enumerations
MStreamBuf:TRead
MStreamBuf:TWrite
TStreamFilter:@28
Private Attributes
TUint8 iBuf
TBuf8 < KEncryptionFilterBufSize > iIn
TPtrC8 iOut

Constructor & Destructor Documentation

TSecureFilter()

TSecureFilter ( ) [protected]

Member Functions Documentation

Capacity(TInt)

IMPORT_C TInt Capacity ( TInt aMaxLength ) [protected, virtual]

Calculates the maximum size of unfiltered data necessary to give the specified amount of filtered data.

Parameters

TInt aMaxLength The amount of filtered data required.

CompleteL(TDes8 &, const TDesC8 &)

void CompleteL ( TDes8 & aTarget,
const TDesC8 & aSource
) [private, pure virtual]

Parameters

TDes8 & aTarget
const TDesC8 & aSource

CryptL(TDes8 &, const TDesC8 &)

TInt CryptL ( TDes8 & aTarget,
const TDesC8 & aSource
) [private, pure virtual]

Parameters

TDes8 & aTarget
const TDesC8 & aSource

DoSynchL()

IMPORT_C void DoSynchL ( ) [protected, virtual]

Synchronizes the host's intermediate buffer with its stream, leaving if any error occurs.

MStreamBuf::DoSynchL()

EmitL(const TDesC8 &)

TInt EmitL ( const TDesC8 & aDes ) [protected]

Parameters

const TDesC8 & aDes

FilterL(TAny *, TInt, const TUint8 *&, const TUint8 *)

IMPORT_C TInt FilterL ( TAny * aPtr,
TInt aMaxLength,
const TUint8 *& aFrom,
const TUint8 * anEnd
) [protected, virtual]

Performs the filtration process.

Parameters

TAny * aPtr Pointer to the output location for the filtered data.
TInt aMaxLength The maximum amount of space available for the filtered data.
const TUint8 *& aFrom A reference to a pointer to the unfiltered data source. This pointer should be advanced as the source is consumed.
const TUint8 * anEnd Pointer to the first byte beyond the end of the unfiltered data source.

Set(MStreamBuf *, TInt)

void Set ( MStreamBuf * aHost,
TInt aMode = EWrite
) [protected]

Sets up the filter to use the specified host for streamed data.

Taking ownership of the host stream buffer means that calls to SynchL() propagate to the host buffer after the filter has flushed its data, and that when the filter is released it also releases the host buffer.

MStreamBuf::TRead MStreamBuf::TWrite

Parameters

MStreamBuf * aHost The host for the streamed data - a stream buffer.
TInt aMode = EWrite The mode in which the stream buffer is to be used. It can be used in either read or write modes, represented by ERead and EWrite, but not both at the same time. In debug mode, setting both raises a STORE-Stream 18 panic. In addition, specify EAttached to indicate that the filter should take ownership of the host stream buffer.

Member Data Documentation

TUint8 iBuf

TUint8 iBuf [private]

TBuf8< KEncryptionFilterBufSize > iIn

TBuf8 < KEncryptionFilterBufSize > iIn [private]

TPtrC8 iOut

TPtrC8 iOut [private]