williamr@4: /* williamr@4: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of the License "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * TProtectionKey declaration williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: #ifndef PROTECTIONKEY_H williamr@4: #define PROTECTIONKEY_H williamr@4: williamr@4: #include williamr@4: williamr@4: namespace AuthServer williamr@4: { williamr@4: williamr@4: /** williamr@4: * CProtectionKey is a cryptographic key that is assigned to an williamr@4: * identity. Protection keys are used by authentication clients williamr@4: * to protect data that only the associated identity should be williamr@4: * able to access. Protection keys are generated by the AuthServer williamr@4: * when a new identity is created. williamr@4: */ williamr@4: NONSHARABLE_CLASS(CProtectionKey) : public CBase williamr@4: { williamr@4: public: williamr@4: virtual ~CProtectionKey(); williamr@4: williamr@4: williamr@4: IMPORT_C static CProtectionKey* NewL(TInt aKeySize); williamr@4: IMPORT_C static CProtectionKey* NewLC(TInt aKeySize); williamr@4: IMPORT_C static CProtectionKey* NewL(HBufC8* aKeyData); williamr@4: IMPORT_C static CProtectionKey* NewLC(HBufC8* aKeyData); williamr@4: williamr@4: IMPORT_C CProtectionKey* ClientKeyL(TInt aClientUid) const; williamr@4: IMPORT_C TPtrC8 KeyData() const; williamr@4: williamr@4: private: williamr@4: CProtectionKey(); williamr@4: void ConstructL(TInt aKeySize); williamr@4: void ConstructL(HBufC8* aKeyData); williamr@4: williamr@4: HBufC8* iKeyData; williamr@4: }; williamr@4: williamr@4: } williamr@4: williamr@4: #endif // PROTECTIONKEY_H