REncryptStream Class Reference

class REncryptStream : public RWriteStream

Supports the encryption of a stream.

The stream to be encrypted is a stream represented by an existing RWriteStream object. In effect, REncryptStream forms a layer over the RWriteStream object, either using its target stream buffer or taking complete ownership of the target stream buffer.

Encryption of streamed data is supported using the TEncryptFilter class derived from TStreamFilter. Encryption itself is performed by an instance of a class implementing the CPBEncryptionBase interface.

TEncryptFilter TStreamFilter CPBEncryptionBase

Inherits from

Constructor & Destructor Documentation

REncryptStream()

REncryptStream()[inline]

Constructs an empty encrypting stream object.

Call OpenL() or OpenLC() to use a target stream owned by an existing write stream interface object, a RWriteStream.

Call AttachL() or AttachLC() to use and take ownership of a target stream owned by an existing write stream interface object.

REncryptStream(const MExternalizer< TStreamRef > &)

REncryptStream(const MExternalizer< TStreamRef > &anExter)[inline]

Parameters

const MExternalizer< TStreamRef > & anExter

Member Functions Documentation

AttachL(RWriteStream &, const CPBEncryptionBase &)

IMPORT_C voidAttachL(RWriteStream &aHost,
const CPBEncryptionBase &aKey
)
Attach an encrypting write stream to aHost. Takes ownership of the target stream owned by the specified write stream interface object, and prepares the stream for writing through an encrypting filter.
leave
KErrNoMemory

Parameters

RWriteStream & aHostThe write stream interface object for the target stream
const CPBEncryptionBase & aKeyA Password Based Encryption object for encryption handling.

AttachLC(RWriteStream &, const CPBEncryptionBase &)

IMPORT_C voidAttachLC(RWriteStream &aHost,
const CPBEncryptionBase &aKey
)
Attach an encrypting write stream to aHost. Takes ownership of the target stream owned by the specified write stream interface object, prepares the stream for writing through an encrypting filter, and puts a cleanup item onto the cleanup stack.
leave
KErrNoMemory

Parameters

RWriteStream & aHostThe write stream interface object for the target stream
const CPBEncryptionBase & aKeyA Password Based Encryption object for encryption handling.

OpenL(RWriteStream &, const CPBEncryptionBase &)

IMPORT_C voidOpenL(RWriteStream &aHost,
const CPBEncryptionBase &aKey
)
Open an encrypting write stream over aHost. Prepares the target stream owned by the specified write stream interface object for writing through an encrypting filter.
leave
KErrNoMemory

Parameters

RWriteStream & aHostThe write stream interface object for the target stream. The function does not take ownership of the target stream.
const CPBEncryptionBase & aKeyA Password Based Encryption object for encryption handling.

OpenLC(RWriteStream &, const CPBEncryptionBase &)

IMPORT_C voidOpenLC(RWriteStream &aHost,
const CPBEncryptionBase &aKey
)
Open an encrypting write stream over aHost. Prepares the target stream owned by the specified write stream interface object for writing through an encrypting filter and puts a cleanup item onto the cleanup stack.
leave
KErrNoMemory

Parameters

RWriteStream & aHostThe write stream interface object for the target stream. The function does not take ownership of the target stream.
const CPBEncryptionBase & aKeyA Password Based Encryption object for encryption handling.

Member Data Documentation

TEncryptFilter iFilter

TEncryptFilter iFilter[private]