author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of the License "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: |
williamr@4 | 15 |
* TProtectionKey declaration |
williamr@4 | 16 |
* |
williamr@4 | 17 |
*/ |
williamr@4 | 18 |
|
williamr@4 | 19 |
|
williamr@4 | 20 |
/** |
williamr@4 | 21 |
@file |
williamr@4 | 22 |
@publishedAll |
williamr@4 | 23 |
@released |
williamr@4 | 24 |
*/ |
williamr@4 | 25 |
#ifndef PROTECTIONKEY_H |
williamr@4 | 26 |
#define PROTECTIONKEY_H |
williamr@4 | 27 |
|
williamr@4 | 28 |
#include <s32strm.h> |
williamr@4 | 29 |
|
williamr@4 | 30 |
namespace AuthServer |
williamr@4 | 31 |
{ |
williamr@4 | 32 |
|
williamr@4 | 33 |
/** |
williamr@4 | 34 |
* CProtectionKey is a cryptographic key that is assigned to an |
williamr@4 | 35 |
* identity. Protection keys are used by authentication clients |
williamr@4 | 36 |
* to protect data that only the associated identity should be |
williamr@4 | 37 |
* able to access. Protection keys are generated by the AuthServer |
williamr@4 | 38 |
* when a new identity is created. |
williamr@4 | 39 |
*/ |
williamr@4 | 40 |
NONSHARABLE_CLASS(CProtectionKey) : public CBase |
williamr@4 | 41 |
{ |
williamr@4 | 42 |
public: |
williamr@4 | 43 |
virtual ~CProtectionKey(); |
williamr@4 | 44 |
|
williamr@4 | 45 |
|
williamr@4 | 46 |
IMPORT_C static CProtectionKey* NewL(TInt aKeySize); |
williamr@4 | 47 |
IMPORT_C static CProtectionKey* NewLC(TInt aKeySize); |
williamr@4 | 48 |
IMPORT_C static CProtectionKey* NewL(HBufC8* aKeyData); |
williamr@4 | 49 |
IMPORT_C static CProtectionKey* NewLC(HBufC8* aKeyData); |
williamr@4 | 50 |
|
williamr@4 | 51 |
IMPORT_C CProtectionKey* ClientKeyL(TInt aClientUid) const; |
williamr@4 | 52 |
IMPORT_C TPtrC8 KeyData() const; |
williamr@4 | 53 |
|
williamr@4 | 54 |
private: |
williamr@4 | 55 |
CProtectionKey(); |
williamr@4 | 56 |
void ConstructL(TInt aKeySize); |
williamr@4 | 57 |
void ConstructL(HBufC8* aKeyData); |
williamr@4 | 58 |
|
williamr@4 | 59 |
HBufC8* iKeyData; |
williamr@4 | 60 |
}; |
williamr@4 | 61 |
|
williamr@4 | 62 |
} |
williamr@4 | 63 |
|
williamr@4 | 64 |
#endif // PROTECTIONKEY_H |