CPBEncryptionData Class Reference

class CPBEncryptionData : public CBase

Represents the information needed to decrypt encrypted data given the correct password. Contains the authentication key, and the parameters used to derive the encryption key. A CPBEncryptionData object needs to be stored to recover any data for later use.

Inherits from

Public Member Functions
~CPBEncryptionData (void)
IMPORT_C const CPBAuthData & AuthData ()
IMPORT_C const CPBEncryptParms & EncryptParms ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C CPBEncryptionData * NewL (const TDesC8 &, TPBECipher , const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint )
IMPORT_C CPBEncryptionData * NewL (const CPBEncryptionData &)
IMPORT_C CPBEncryptionData * NewL ( RReadStream &)
IMPORT_C CPBEncryptionData * NewL (const TDesC8 &, const TDesC8 &, const CPBEncryptParms &)
IMPORT_C CPBEncryptionData * NewLC (const TDesC8 &, TPBECipher , const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint )
IMPORT_C CPBEncryptionData * NewLC (const CPBEncryptionData &)
IMPORT_C CPBEncryptionData * NewLC ( RReadStream &)
Protected Member Functions
CPBEncryptionData (void)
void ConstructL (const TDesC8 &, TPBECipher , const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint )
void ConstructL (const CPBEncryptionData &)
void ConstructL (const TDesC8 &, const TDesC8 &, const CPBEncryptParms &)
void ConstructL ( RReadStream &)
Private Member Functions
CPBEncryptionData (const CPBEncryptionData &)
CPBEncryptionData & operator= (const CPBEncryptionData &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CPBAuthData * iAuth
CPBEncryptParms * iParms

Constructor & Destructor Documentation

CPBEncryptionData(void)

IMPORT_C CPBEncryptionData ( void ) [protected]

Constructor

Parameters

void

CPBEncryptionData(const CPBEncryptionData &)

CPBEncryptionData ( const CPBEncryptionData & ) [private]

Parameters

const CPBEncryptionData &

~CPBEncryptionData(void)

~CPBEncryptionData ( void ) [virtual]

Destructor

Parameters

void

Member Functions Documentation

AuthData()

IMPORT_C const CPBAuthData & AuthData ( ) const

Returns the authentication data object.

ConstructL(const TDesC8 &, TPBECipher, const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint)

void ConstructL ( const TDesC8 & aPassword,
TPBECipher aCipher,
const TDesC8 & aAuthSalt,
const TDesC8 & aEncryptSalt,
const TDesC8 & aIV,
TUint aIterations
) [protected]

Parameters

const TDesC8 & aPassword
TPBECipher aCipher
const TDesC8 & aAuthSalt
const TDesC8 & aEncryptSalt
const TDesC8 & aIV
TUint aIterations

ConstructL(const CPBEncryptionData &)

void ConstructL ( const CPBEncryptionData & aData ) [protected]

Parameters

const CPBEncryptionData & aData

ConstructL(const TDesC8 &, const TDesC8 &, const CPBEncryptParms &)

void ConstructL ( const TDesC8 & aPassword,
const TDesC8 & aAuthSalt,
const CPBEncryptParms & aParms
) [protected]

Second-phase constructor for factory function with same signature.

Parameters

const TDesC8 & aPassword
const TDesC8 & aAuthSalt
const CPBEncryptParms & aParms

ConstructL(RReadStream &)

void ConstructL ( RReadStream & aStream ) [protected]

Parameters

RReadStream & aStream

EncryptParms()

IMPORT_C const CPBEncryptParms & EncryptParms ( ) const

Returns the encryption parameter object.

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the encryption data into a write stream.

Parameters

RWriteStream & aStream The stream to write to

NewL(const TDesC8 &, TPBECipher, const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint)

IMPORT_C CPBEncryptionData * NewL ( const TDesC8 & aPassword,
TPBECipher aCipher,
const TDesC8 & aAuthSalt,
const TDesC8 & aEncryptSalt,
const TDesC8 & aIV,
TUint aIterations
) [static]

Creates a new CPBEncryptionData object

Parameters

const TDesC8 & aPassword The user's initial password
TPBECipher aCipher The cipher to use
const TDesC8 & aAuthSalt The salt used for the authentication
const TDesC8 & aEncryptSalt The salt used for the encryption
const TDesC8 & aIV The Initialization Vector
TUint aIterations The number of iterations of the PBE algorithm

NewL(const CPBEncryptionData &)

IMPORT_C CPBEncryptionData * NewL ( const CPBEncryptionData & aData ) [static]

Creates a new CPBEncryptionData from an existing one.

Parameters

const CPBEncryptionData & aData The existing CPBEncryptionData object

NewL(RReadStream &)

IMPORT_C CPBEncryptionData * NewL ( RReadStream & aStream ) [static]

Internalizes the encryption data from a read stream.

Parameters

RReadStream & aStream The stream to read from

NewL(const TDesC8 &, const TDesC8 &, const CPBEncryptParms &)

IMPORT_C CPBEncryptionData * NewL ( const TDesC8 & aPassword,
const TDesC8 & aAuthSalt,
const CPBEncryptParms & aParms
) [static]

This factory function takes the user-supplied password and the randomly-generated authentication salt, along with the encryption paramaters. It is provided so the encryption parameters can be extended without having to provide multiple factory functions.

Parameters

const TDesC8 & aPassword User-supplied password. This password is not transformed so if it needs to be in a particular format, e.g. for PKCS#12, the transformation must be applied before this function is called.
const TDesC8 & aAuthSalt The salt is used to derive the authentication key; not the encryption key.
const CPBEncryptParms & aParms Encryption parameters describe how the data is encrypted.

NewLC(const TDesC8 &, TPBECipher, const TDesC8 &, const TDesC8 &, const TDesC8 &, TUint)

IMPORT_C CPBEncryptionData * NewLC ( const TDesC8 & aPassword,
TPBECipher aCipher,
const TDesC8 & aAuthSalt,
const TDesC8 & aEncryptSalt,
const TDesC8 & aIV,
TUint aIterations
) [static]

Creates a new CPBEncryptionData object and puts a pointer to it onto the cleanup stack.

Parameters

const TDesC8 & aPassword The user's initial password
TPBECipher aCipher The cipher to use
const TDesC8 & aAuthSalt The salt used for the authentication
const TDesC8 & aEncryptSalt The salt used for the encryption
const TDesC8 & aIV The Initialization Vector
TUint aIterations The number of iterations of the PBE algorithm

NewLC(const CPBEncryptionData &)

IMPORT_C CPBEncryptionData * NewLC ( const CPBEncryptionData & aData ) [static]

Creates a new CPBEncryptionData from an existing one, and puts a pointer to it onto the cleanup stack.

Parameters

const CPBEncryptionData & aData The existing CPBEncryptionData object

NewLC(RReadStream &)

IMPORT_C CPBEncryptionData * NewLC ( RReadStream & aStream ) [static]

Internalizes the encryption data from a read stream, and puts a pointer to it onto the cleanup stack.

Parameters

RReadStream & aStream The stream to read from

operator=(const CPBEncryptionData &)

CPBEncryptionData & operator= ( const CPBEncryptionData & ) [private]

Parameters

const CPBEncryptionData &

Member Data Documentation

CPBAuthData * iAuth

CPBAuthData * iAuth [private]

CPBEncryptParms * iParms

CPBEncryptParms * iParms [private]