os/security/cryptoplugins/cryptospiplugins/source/softwarecrypto/keypairgenimpl.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoplugins/cryptospiplugins/source/softwarecrypto/keypairgenimpl.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,72 @@
1.4 +/*
1.5 +* Copyright (c) 2007-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 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef __KEYPAIRGENIMPL_H__
1.23 +#define __KEYPAIRGENIMPL_H__
1.24 +
1.25 +/**
1.26 +@file
1.27 +@internalComponent
1.28 +@released
1.29 +*/
1.30 +
1.31 +#include "cryptokeypairgeneratorapi.h"
1.32 +#include "keypairgeneratorplugin.h"
1.33 +
1.34 +/**
1.35 + * Key pair generator plugin base class
1.36 + */
1.37 +namespace SoftwareCrypto
1.38 + {
1.39 + using namespace CryptoSpi;
1.40 +
1.41 + NONSHARABLE_CLASS(CKeyPairGenImpl) : public CBase, public MKeyPairGenerator
1.42 + {
1.43 + public:
1.44 +
1.45 + // Override MPlugin virtual functions
1.46 + void Close();
1.47 + TAny* GetExtension(TUid aExtensionId);
1.48 + void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
1.49 + // End of MPlugin
1.50 +
1.51 + // Destructor
1.52 + ~CKeyPairGenImpl();
1.53 +
1.54 + protected:
1.55 + /**
1.56 + Constructor
1.57 + */
1.58 + CKeyPairGenImpl();
1.59 +
1.60 + /**
1.61 + Second phase of construction. Always call ConstructL in the super-class
1.62 + if you override this method.
1.63 + */
1.64 + virtual void ConstructL();
1.65 +
1.66 + /**
1.67 + Helper function implemented by concrete cipher sub-class that allows
1.68 + GetCharacteristicsL to return the correct characteristics object.
1.69 + @return The implemention uid
1.70 + */
1.71 + virtual TUid ImplementationUid() const = 0;
1.72 + };
1.73 + }
1.74 +
1.75 +#endif // __KEYPAIRGENIMPL_H__