This section explains how to change the passphrase.
The following steps explain the process of changing the passphrase:
The passphrase is changed for the selected key, if the old passphrase is entered correctly.
The following code snippet shows how to set use policy for a key.
// Create a file system session object RFs iFs; CleanupClosePushL(&iFs); ... // Initialise the keystore and member functions CUnifiedKeyStore* keyStore = CUnifiedKeyStore::NewL(fs); keyStore->Initialize(iStatus); //iStatus is a TRequestStatus object ... // Change the passphrase void ChangePassphraseL(CCTKeyInfo& aKey) { MCTAuthenticationObject* authObject = aKey.Protector(); if (authObject == NULL) User::Leave(KErrNotSupported); authObject->ChangeReferenceData(iStatus); iState = EChangePassphrase; SetActive(); } // Clean up CleanupStack::PopAndDestroy(); // iFs
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.