2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * TProtectionKey declaration
25 #ifndef PROTECTIONKEY_H
26 #define PROTECTIONKEY_H
34 * CProtectionKey is a cryptographic key that is assigned to an
35 * identity. Protection keys are used by authentication clients
36 * to protect data that only the associated identity should be
37 * able to access. Protection keys are generated by the AuthServer
38 * when a new identity is created.
40 NONSHARABLE_CLASS(CProtectionKey) : public CBase
43 virtual ~CProtectionKey();
46 IMPORT_C static CProtectionKey* NewL(TInt aKeySize);
47 IMPORT_C static CProtectionKey* NewLC(TInt aKeySize);
48 IMPORT_C static CProtectionKey* NewL(HBufC8* aKeyData);
49 IMPORT_C static CProtectionKey* NewLC(HBufC8* aKeyData);
51 IMPORT_C CProtectionKey* ClientKeyL(TInt aClientUid) const;
52 IMPORT_C TPtrC8 KeyData() const;
56 void ConstructL(TInt aKeySize);
57 void ConstructL(HBufC8* aKeyData);
64 #endif // PROTECTIONKEY_H