epoc32/include/authserver/protectionkey.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 * TProtectionKey declaration
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @publishedAll
    23  @released
    24 */
    25 #ifndef PROTECTIONKEY_H
    26 #define PROTECTIONKEY_H
    27 
    28 #include <s32strm.h>
    29 
    30 namespace AuthServer
    31 {
    32 
    33 /**
    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.
    39  */
    40 NONSHARABLE_CLASS(CProtectionKey) : public CBase
    41 	{
    42 public:
    43 	virtual ~CProtectionKey();
    44 	
    45 
    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);
    50 
    51 	IMPORT_C CProtectionKey* ClientKeyL(TInt aClientUid) const;
    52 	IMPORT_C TPtrC8 KeyData() const;
    53 	
    54 private:
    55 	CProtectionKey();
    56 	void ConstructL(TInt aKeySize);
    57 	void ConstructL(HBufC8* aKeyData);
    58 
    59 	HBufC8* iKeyData;
    60 	};
    61 
    62 }
    63 
    64 #endif // PROTECTIONKEY_H