Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: s32crypt.h
Link against: estor.lib

Class REncryptStream

REncryptStream

Support

Supported from 5.0

Description

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 encryption handling object, an instance of a class implementing the CSecurityEncryptBase interface, and which is constructed by a factory function supplied by the security model, an implementation of CSecurityBase.

Derivation

REncryptStreamSupports the encryption of a stream
RWriteStreamThe write stream interface

Defined in REncryptStream:
AttachL(), AttachLC(), OpenL(), OpenLC(), REncryptStream()

Inherited from RWriteStream:
Attach(), Close(), CommitL(), Detach(), Pop(), PushL(), Release(), Sink(), WriteInt16L(), WriteInt32L(), WriteInt8L(), WriteL(), WriteReal32L(), WriteReal64L(), WriteUint16L(), WriteUint32L(), WriteUint8L()

See also:


Construction


REncryptStream()

REncryptStream();

Description

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.

[Top]


Member functions


AttachL()

void AttachL(RWriteStream& aHost,const CSecurityBase& aKey,const TDesC8& aInit);

Description

Takes ownership of the target stream owned by the specified write stream interface object, and prepares the stream for writing through an encrypting filter.

The function inserts an encrypting filter, an instance of a TStreamFilter derived class, between itself and the target stream buffer.

Parameters

RWriteStream& aHost

The write stream interface object for the target stream.

CSecurityBase& aKey

Interface to the security model used to generate an encryption handling object.

const TDesC8& aInit

Initialisation vector data for the encryption handling object.


AttachLC()

void AttachLC(RWriteStream& aHost,const CSecurityBase& aKey,const TDesC8& aInit);

Description

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.

The function inserts an encrypting filter, an instance of a TStreamFilter derived class, between itself and the target stream buffer.

Parameters

RWriteStream& aHost

The write stream interface object for the target stream.

CSecurityBase& aKey

Interface to the security model used to generate an encryption handling object.

const TDesC8& aInit

Initialisation vector data for the encryption handling object.


OpenL()

void OpenL(RWriteStream& aHost,const CSecurityBase& aKey,const TDesC8& aInit);

Description

Prepares the target stream owned by the specified write stream interface object for writing through an encrypting filter.

The function inserts an encrypting filter, an instance of a TStreamFilter derived class, between itself and the target stream buffer.

The function does not take ownership of the target stream.

Parameters

RWriteStream& aHost

The write stream interface object for the target stream.

CSecurityBase& aKey

Interface to the security model used to generate an encryption handling object.

const TDesC8& aInit

Initialisation vector data for the encryption handling object.


OpenLC()

void OpenLC(RWriteStream& aHost,const CSecurityBase& aKey,const TDesC8& aInit);

Description

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.

The function inserts an encrypting filter, an instance of a TStreamFilter derived class, between itself and the target stream buffer.

The function does not take ownership of the target stream.

Parameters

RWriteStream& aHost

The write stream interface object for the target stream.

CSecurityBase& aKey

Interface to the security model used to generate an encryption handling object.

const TDesC8& aInit

Initialisation vector data for the encryption handling object.