CPBEncryptParms Class Reference
class CPBEncryptParms : public CBase |
Nested Classes and Structures
Constructor & Destructor Documentation
CPBEncryptParms(void)
IMPORT_C | CPBEncryptParms | ( | void | | ) | [protected] |
CPBEncryptParms(const CPBEncryptParms &)
~CPBEncryptParms(void)
~CPBEncryptParms | ( | void | | ) | [virtual] |
Member Functions Documentation
ConstructL()
void | ConstructL | ( | ) | [protected] |
Initialize this object with default cipher, kdf (PKCS#5,) salt length, iteration count, and IV.
ConstructL(TPBECipher, const TDesC8 &, const TDesC8 &, TUint)
ConstructL(const CPBEncryptParms &)
ConstructL(RReadStream &)
DeriveKeyL(const TDesC8 &, TDes8 &)
void | DeriveKeyL | ( | const TDesC8 & | aPassword, |
| TDes8 & | aKeyBuf |
| ) | const |
Derive a key from this object's kdf, salt, amd iteration count.
Parameters
const TDesC8 & aPassword | User-supplied password used to generate key. |
TDes8 & aKeyBuf | Buffer to populate with new key. On entry it must be set to the required key length. |
ExternalizeL(RWriteStream &)
Externalizes the encryption parameters into a write stream.
IV()
Gets the PBE Initialization Vector
Iterations()
IMPORT_C TInt | Iterations | ( | ) | const |
Gets the number of iterations for the PKCS#5 algorithm.
Kdf()
Gets the key derivation function (KDF.)
Accessor function returns the key derivation function (KDF) specified by this object.
NewL(TPBECipher, const TDesC8 &, const TDesC8 &, TUint)
Parameters
TPBECipher aCipher | The cipher to use |
const TDesC8 & aSalt | The salt |
const TDesC8 & aIV | The Initialization Vector |
TUint aIterations | The number of iterations of the PBE algorithm |
NewL(const CPBEncryptParms &)
NewL(RReadStream &)
Internalizes encryption parameter data from a read stream.
Parameters
RReadStream & aStream | The read stream to be internalized |
NewL()
This factory function allocates an encryption parameters object with default settings. The individual settings can be retrieved and modified with the accessor and mutator functions after this object has been created.
This factory function is provided so that individual parameters can be modified without providing many factory functions.
NewLC(TPBECipher, const TDesC8 &, const TDesC8 &, TUint)
Creates a new CPBEncryptParms object and puts a pointer to it onto the cleanup stack.
Parameters
TPBECipher aCipher | The cipher to use |
const TDesC8 & aSalt | The salt |
const TDesC8 & aIV | The Initialization Vector |
TUint aIterations | The number of iterations of the PBE algorithm |
NewLC(const CPBEncryptParms &)
Creates a new CPBEncryptParms object from an existing object and puts a pointer to it onto the cleanup stack.
NewLC(RReadStream &)
Internalizes encryption parameter data from a read stream, and puts a pointer to the new object onto the cleanup stack.
Parameters
RReadStream & aStream | The read stream to be internalized |
NewLC()
Similar to the NewL overload which takes no arguments, this function additionally puts the allocated instance of CPBEncryptParms on the cleanup stack.
ResizeSaltL(TInt)
IMPORT_C void | ResizeSaltL | ( | TInt | aNewLen | ) | |
Resize the current salt and replace its contents.
Parameters
TInt aNewLen | New salt length. |
SetCipher(TPBECipher)
Replace the current cipher. This function resizes the IV and replaces its existing contents.
Use SetCipherL instead. SetCipherL
SetCipherL(TPBECipher)
Replace the current cipher. This function resizes the IV and replaces its existing contents.
-
leave
- System wide error code.
SetIV(const TDesC8 &)
IMPORT_C void | SetIV | ( | const TDesC8 & | aNewIv | ) | |
Replace the initialization vector.
Parameters
const TDesC8 & aNewIv | New initialization vector length. This must have no more than KPBEMaxCipherIVBytes bytes. |
SetIterations(TInt)
IMPORT_C void | SetIterations | ( | TInt | aIterCount | ) | |
Replace the current iteration count with the supplied value.
Parameters
TInt aIterCount | Number of iterations to apply in the KDF. |
SetKdf(TKdf)
IMPORT_C void | SetKdf | ( | TKdf | aKdf | ) | |
Replace the current key derivation function.
Parameters
TKdf aKdf | Key derivation function. |
operator=(const CPBEncryptParms &)
Member Enumerations Documentation
Enum TKdf
Key derivation function. This does not affect the authentication key, which always uses PKCS#5.
Member Data Documentation
TUint
iIterations
TUint
| iIterations | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.