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

Constructor & Destructor Documentation

CPBEncryptionData(void)

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

voidConstructL(const TDesC8 &aPassword,
TPBECipheraCipher,
const TDesC8 &aAuthSalt,
const TDesC8 &aEncryptSalt,
const TDesC8 &aIV,
TUintaIterations
)[protected]

Parameters

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

ConstructL(const CPBEncryptionData &)

voidConstructL(const CPBEncryptionData &aData)[protected]

Parameters

const CPBEncryptionData & aData

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

voidConstructL(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 &)

voidConstructL(RReadStream &aStream)[protected]

Parameters

RReadStream & aStream

EncryptParms()

IMPORT_C const CPBEncryptParms &EncryptParms()const

Returns the encryption parameter object.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes the encryption data into a write stream.

Parameters

RWriteStream & aStreamThe stream to write to

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

IMPORT_C CPBEncryptionData *NewL(const TDesC8 &aPassword,
TPBECipheraCipher,
const TDesC8 &aAuthSalt,
const TDesC8 &aEncryptSalt,
const TDesC8 &aIV,
TUintaIterations
)[static]

Creates a new CPBEncryptionData object

Parameters

const TDesC8 & aPasswordThe user's initial password
TPBECipher aCipherThe cipher to use
const TDesC8 & aAuthSaltThe salt used for the authentication
const TDesC8 & aEncryptSaltThe salt used for the encryption
const TDesC8 & aIVThe Initialization Vector
TUint aIterationsThe 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 & aDataThe existing CPBEncryptionData object

NewL(RReadStream &)

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

Internalizes the encryption data from a read stream.

Parameters

RReadStream & aStreamThe 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 & aPasswordUser-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 & aAuthSaltThe salt is used to derive the authentication key; not the encryption key.
const CPBEncryptParms & aParmsEncryption 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,
TPBECipheraCipher,
const TDesC8 &aAuthSalt,
const TDesC8 &aEncryptSalt,
const TDesC8 &aIV,
TUintaIterations
)[static]

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

Parameters

const TDesC8 & aPasswordThe user's initial password
TPBECipher aCipherThe cipher to use
const TDesC8 & aAuthSaltThe salt used for the authentication
const TDesC8 & aEncryptSaltThe salt used for the encryption
const TDesC8 & aIVThe Initialization Vector
TUint aIterationsThe 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 & aDataThe 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 & aStreamThe 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]