CDevEncKeyUtils Class Reference
class CDevEncKeyUtils : public CBase
|
Provides functions for creating and setting encryption keys.
Private Member Functions
|
void
|
DoCreateSetKeyL
(const
TDesC8
&,
TInt
)
|
void
|
DoCreateSetKeyL
(
HBufC8
*&, const
TDesC8
&, const
TInt
)
|
void
|
DoSetKeyL
(const
TDesC8
&, const
TDesC8
&)
|
void
|
ExternalizeKeyL
(const
CPBEncryptElement
*, const
TDesC8
&,
TDes8
&)
|
void
|
GetNewFileStoreL
(
RFs
&,
TDes
&,
CFileStore
*&)
|
void
|
InternalizeKeyL
(
CPBEncryptElement
*&, const
TDesC8
&,
HBufC8
*&, const
TDesC8
&)
|
void
|
LoadDevEncEngineL
()
|
void
|
LoadKeyLC
(
RFs
&, const
TFileName
&,
CPBEncryptionData
*&,
HBufC8
*&)
|
void
|
Pkcs5RemovePadding
(
TPtr8
&)
|
TBool
|
ProcessHasCapability
(
TCapability
)
|
void
|
SaveKeyL
(
CFileStore
*, const
CPBEncryptElement
*, const
TDesC8
&)
|
void
|
UnloadDevEncEngine
()
|
Constructor & Destructor Documentation
CDevEncKeyUtils()
IMPORT_C
|
CDevEncKeyUtils
|
(
|
)
|
|
~CDevEncKeyUtils()
~CDevEncKeyUtils
|
(
|
)
|
[virtual]
|
Member Functions Documentation
Connect()
IMPORT_C
TInt
|
Connect
|
(
|
)
|
|
CreateSetKey(TRequestStatus &, HBufC8 *&, const TDesC8 &, const TInt)
Creates a PKCS#5 key and takes it into use by loading it into the security driver. Asynchronous function.
Parameters
TRequestStatus
& aStatus
|
Contains system-wide error code on completion
|
HBufC8
*& aResult
|
On successful completion, contains PKCS#5 encrypted key (externalized encryption data and ciphertext)
|
const
TDesC8
& aPassword
|
The user password to use for the key
|
const
TInt
aLength
|
The desired length of the key
|
CreateSetKey(TRequestStatus &, const TInt)
Creates a PKCS#5 key and takes it into use by loading it into the security driver. Asynchronous function. A random password is generated and the resulting key is ignored. After completion, the key exists only in the security driver and cannot be retrieved.
Parameters
TRequestStatus
& aStatus
|
Contains system-wide error code on completion
|
const
TInt
aLength
|
The desired length of the key
|
DoCreateSetKeyL(const TDesC8 &, TInt)
void
|
DoCreateSetKeyL
|
(
|
const
TDesC8
&
|
aPassword,
|
|
TInt
|
aLength
|
|
)
|
const [private]
|
DoCreateSetKeyL(HBufC8 *&, const TDesC8 &, const TInt)
void
|
DoCreateSetKeyL
|
(
|
HBufC8
*&
|
aResult,
|
|
const
TDesC8
&
|
aPassword,
|
|
const
TInt
|
aLength
|
|
)
|
const [private]
|
DoSetKeyL(const TDesC8 &, const TDesC8 &)
void
|
DoSetKeyL
|
(
|
const
TDesC8
&
|
aPkcs5Key,
|
|
const
TDesC8
&
|
aPassword
|
|
)
|
const [private]
|
ExternalizeKeyL(const CPBEncryptElement *, const TDesC8 &, TDes8 &)
GetNewFileStoreL(RFs &, TDes &, CFileStore *&)
void
|
GetNewFileStoreL
|
(
|
RFs
&
|
aFs,
|
|
TDes
&
|
aFileName,
|
|
CFileStore
*&
|
aStore
|
|
)
|
const [private]
|
InternalizeKeyL(CPBEncryptElement *&, const TDesC8 &, HBufC8 *&, const TDesC8 &)
LoadDevEncEngineL()
void
|
LoadDevEncEngineL
|
(
|
)
|
[private]
|
LoadKeyLC(RFs &, const TFileName &, CPBEncryptionData *&, HBufC8 *&)
Pkcs5RemovePadding(TPtr8 &)
void
|
Pkcs5RemovePadding
|
(
|
TPtr8
&
|
aInput
|
)
|
const [private]
|
ProcessHasCapability(TCapability)
ResetKey(TRequestStatus &)
Resets the key in the security driver. Asynchronous function.
Parameters
TRequestStatus
& aStatus
|
Contains system-wide error code on completion
|
SaveKeyL(CFileStore *, const CPBEncryptElement *, const TDesC8 &)
SetKey(TRequestStatus &, const TDesC8 &, const TDesC8 &)
Sets the specified PKCS#5 key in the security driver. Asynchronous function.
Parameters
TRequestStatus
& aStatus
|
Contains system-wide error code on completion
|
const
TDesC8
& aPkcs5Key
|
The encrypted PKCS#5 key data (externalized encryption data and ciphertext)
|
const
TDesC8
& aPassword
|
The user password to use for the key
|
UnloadDevEncEngine()
void
|
UnloadDevEncEngine
|
(
|
)
|
[private]
|
Member Data Documentation
CDevEncEngineBase * iDevEncEngine
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.