1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/authserver/protectionkey.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,64 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* TProtectionKey declaration
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +#ifndef PROTECTIONKEY_H
1.29 +#define PROTECTIONKEY_H
1.30 +
1.31 +#include <s32strm.h>
1.32 +
1.33 +namespace AuthServer
1.34 +{
1.35 +
1.36 +/**
1.37 + * CProtectionKey is a cryptographic key that is assigned to an
1.38 + * identity. Protection keys are used by authentication clients
1.39 + * to protect data that only the associated identity should be
1.40 + * able to access. Protection keys are generated by the AuthServer
1.41 + * when a new identity is created.
1.42 + */
1.43 +NONSHARABLE_CLASS(CProtectionKey) : public CBase
1.44 + {
1.45 +public:
1.46 + virtual ~CProtectionKey();
1.47 +
1.48 +
1.49 + IMPORT_C static CProtectionKey* NewL(TInt aKeySize);
1.50 + IMPORT_C static CProtectionKey* NewLC(TInt aKeySize);
1.51 + IMPORT_C static CProtectionKey* NewL(HBufC8* aKeyData);
1.52 + IMPORT_C static CProtectionKey* NewLC(HBufC8* aKeyData);
1.53 +
1.54 + IMPORT_C CProtectionKey* ClientKeyL(TInt aClientUid) const;
1.55 + IMPORT_C TPtrC8 KeyData() const;
1.56 +
1.57 +private:
1.58 + CProtectionKey();
1.59 + void ConstructL(TInt aKeySize);
1.60 + void ConstructL(HBufC8* aKeyData);
1.61 +
1.62 + HBufC8* iKeyData;
1.63 + };
1.64 +
1.65 +}
1.66 +
1.67 +#endif // PROTECTIONKEY_H