diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-85EAD2EA-6ADB-5866-9784-5E2B30E661AF.dita --- a/Symbian3/PDK/Source/GUID-85EAD2EA-6ADB-5866-9784-5E2B30E661AF.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-85EAD2EA-6ADB-5866-9784-5E2B30E661AF.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,88 +1,88 @@ - - - - - -Deleting -Keys This section provides information on deleting keys. -

The unified keystore allows the deletion of any key. The following -steps explain the process of deleting a key:

- - -Create a file system session using an RFs object. - - -Create an object of type CUnifiedKeyStore using CUnifiedKeyStore::NewL() or CUnifiedKeyStore::NewLC(). - - -Initialise the member functions and keystore using the asynchronous -function CUnifiedKeyStore::Initialize(). - - -Use the CUnifiedKeyStore::List() function to list -the keys of the keystore. Retrieve the handle of the key to be deleted. - -Use the CUnifiedKeyStore::DeleteKey() function -to delete the key. - - -

The selected key is deleted from the keystore.

-Example

The following code snippet shows how to -initialise the unified keystore, list the keys in a keystore, select a particular -key and delete it.

//Create a file system session object -RFs iFs; -CleanupClosePushL(&iFs); - - - -//Initialise the keystore and member functions -CUnifiedKeyStore* keyStore = CUnifiedKeyStore::NewL(iFs); -keyStore->Initialize(iStatus); //iStatus is a TRequestStatus object - - -//List the keys of the keystore -RPointerArray<CCTKeyInfo> iKeys; // This variable will contain the key for deletion -TCTKeyAttributeFilter filter.iUsage = EPKCS15UsageAll; -keyStore->List(iKeys, filter, iStatus); - - -... - - - -//Retrieve the handle of the key to be deleted -_LIT(KLabel,”keylabel”); - - - -//Select the key with the label you are looking for -for (TInt j = 0; j < iKeys.Count(); j++) - { - if (Keys[j]->Label() == KLabel) - { - keyIndex = j; - break; - } - } - - -... - - - -//Delete the selected key -keyStore->DeleteKey(*iKeys[keyIndex], iStatus); - - -//Clean up -CleanupStack::PopAndDestroy(); // iFs
-
-Unified Keystore - + + + + + +Deleting +Keys This section provides information on deleting keys. +

The unified keystore allows the deletion of any key. The following +steps explain the process of deleting a key:

+ + +Create a file system session using an RFs object. + + +Create an object of type CUnifiedKeyStore using CUnifiedKeyStore::NewL() or CUnifiedKeyStore::NewLC(). + + +Initialise the member functions and keystore using the asynchronous +function CUnifiedKeyStore::Initialize(). + + +Use the CUnifiedKeyStore::List() function to list +the keys of the keystore. Retrieve the handle of the key to be deleted. + +Use the CUnifiedKeyStore::DeleteKey() function +to delete the key. + + +

The selected key is deleted from the keystore.

+Example

The following code snippet shows how to +initialise the unified keystore, list the keys in a keystore, select a particular +key and delete it.

//Create a file system session object +RFs iFs; +CleanupClosePushL(&iFs); + + + +//Initialise the keystore and member functions +CUnifiedKeyStore* keyStore = CUnifiedKeyStore::NewL(iFs); +keyStore->Initialize(iStatus); //iStatus is a TRequestStatus object + + +//List the keys of the keystore +RPointerArray<CCTKeyInfo> iKeys; // This variable will contain the key for deletion +TCTKeyAttributeFilter filter.iUsage = EPKCS15UsageAll; +keyStore->List(iKeys, filter, iStatus); + + +... + + + +//Retrieve the handle of the key to be deleted +_LIT(KLabel,”keylabel”); + + + +//Select the key with the label you are looking for +for (TInt j = 0; j < iKeys.Count(); j++) + { + if (Keys[j]->Label() == KLabel) + { + keyIndex = j; + break; + } + } + + +... + + + +//Delete the selected key +keyStore->DeleteKey(*iKeys[keyIndex], iStatus); + + +//Clean up +CleanupStack::PopAndDestroy(); // iFs
+
+Unified Keystore +
\ No newline at end of file