os/security/cryptoplugins/cryptospiplugins/test/dummyecchwplugin/src/pluginentry.h
Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
24 #ifndef CPLUGINENTRY_H
25 #define CPLUGINENTRY_H
27 #include <cryptospi/cryptoparams.h>
29 #include <cryptospi/cryptospidef.h>
31 #include <cryptospi/hashplugin.h>
32 #include <cryptospi/randomplugin.h>
33 #include "symmetriccipherplugin.h"
34 #include "asymmetriccipherplugin.h"
35 #include "signerplugin.h"
36 #include "verifierplugin.h"
37 #include "keypairgeneratorplugin.h"
38 #include "keyagreementplugin.h"
40 using namespace CryptoSpi;
42 class CCryptoPluginEntry
46 * Enumerates the set of plug-ins supported by the module for a given interface
47 * e.g. all of the hash plug-ins.
49 * @param aInterface The UID of the plug-in interface type. If the UID is not recognised
50 * then the NULL pointer must be returned.
51 * @param aNumPlugins The number of plug-in characteristics objects in the result.
53 IMPORT_C static const TCharacteristics** Enumerate(TUid aInterface,
56 IMPORT_C static void GetExtendedCharacteristicsL(TUid aImplementationUid,
57 CExtendedCharacteristics*&);
60 * Creates a new instance of an asymmetric cipher
62 * @param aPlugin A reference to a pointer that should be set to point to
63 * the new asymmetric cipher object.
64 * @param aImplementationId The UID of the asymmetric cipher plug-in to instantiate.
65 * @param aKey The encryption/decryption key.
66 * @param aPaddingMode The padding mode.
67 * @param aAlgorithmParams The parameters that are specific to a particular
68 * algorithm. This is for extendibility and will normally be null.
70 * @leave Function can leave with any system wide error codes in
73 IMPORT_C static void CreateAsymmetricCipherL(MAsymmetricCipher*& aPlugin,
74 TUid aImplementationId, const CKey& aKey, TUid aCryptoMode,
75 TUid aPaddingMode, const CCryptoParams* aAlgorithmParams);
78 * Creates a new instance of an asymmetric signer.
80 * @param aPlugin A reference to a pointer that should be set to point to
81 * the new asymmetric signer object.
82 * @param aImplementationId The UID of the signer plug-in to instantiate.
83 * @param aKey The signing key.
84 * @param aPaddingMode The padding mode.
85 * @param aAlgorithmParams The parameters that are specific to a particular
86 * algorithm. This is for extendibility and will normally be null.
88 * @leave Function can leave with any system wide error codes in
91 IMPORT_C static void CreateAsymmetricSignerL(MSigner*& aPlugin,
92 TUid aImplementationId, const CKey& aKey, TUid aPaddingMode,
93 const CCryptoParams* aAlgorithmParams);
96 * Creates a new instance of an asymmetric verifier.
98 * @param aPlugin A reference to a pointer that should be set to point to
99 * the new asymmetric verifier object.
100 * @param aImplementationId The UID of the verifier plug-in to instantiate.
101 * @param aKey The key to verify the signature with.
102 * @param aAlgorithmParams The parameters that are specific to a particular
103 * algorithm. This is for extendibility and will normally be null.
105 * @leave Function can leave with any system wide error codes in
108 IMPORT_C static void CreateAsymmetricVerifierL(MVerifier*& aPlugin,
109 TUid aImplementationId,
112 const CCryptoParams* aAlgorithmParams);
115 * Creates a new instance of a Hash object.
117 * @param aPlugin A reference to a pointer that should be set to point to
118 * the new hash object.
119 * @param aImplementationId The UID of the hash plug-in to instantiate.
120 * @param aAlgorithmParams The parameters that are specific to a particular
121 * algorithm. This is for extendibility and will normally be null.
123 * @leave Function can leave with any system wide error codes in
126 IMPORT_C static void CreateHashL(MHash*& aPlugin,
127 TUid aImplementationId,
130 const CCryptoParams* aAlgorithmParams);
133 * Creates a new instance of a Random object.
135 * @param aPlugin A reference to a pointer that should be set to point to the new random object.
136 * @param aImplementationId The UID of the random plug-in to instantiate.
137 * @param aAlgorithmParams The parameters that are specific to a particular
138 * algorithm. This is for extendibility and will normally be null.
140 * @leave Function can leave with any system wide error codes in
143 IMPORT_C static void CreateRandomL(MRandom*& aPlugin,
144 TUid aImplementationId,
145 const CCryptoParams* aAlgorithmParams);
149 * Creates a new instance of a key agreement system.
151 * @param aPlugin A reference to a pointer that should be set to point to
152 * the new asymmetric key pair generator object.
153 * @param aImplementationId The UID of the key agreement plug-in to instantiate.
154 * @param aPrivateKey The private key to combine with the other parties public key
155 * during the agreement.
156 * @param aAlgorithmParams The parameters that are specific to a particular
157 * algorithm. This is for extendibility and will normally be null.
159 * @leave Function can leave with any system wide error codes in
162 IMPORT_C static void CreateKeyAgreementL(MKeyAgreement*& aPlugin,
163 TUid aImplementationId,
164 const CKey& aPrivateKey,
165 const CCryptoParams* aAlgorithmParams);
168 * Creates a new instance of an asymmetric key pair generator.
170 * @param aPlugin A reference to a pointer that should be set to point to
171 * the new asymmetric key pair generator object.
172 * @param aImplementationId The UID of the verifier plug-in to instantiate.
173 * @param aAlgorithmParams The parameters that are specific to a particular
174 * algorithm. This is for extendibility and will normally be null.
176 * @leave Function can leave with any system wide error codes in
179 IMPORT_C static void CreateKeyPairGeneratorL(MKeyPairGenerator*& aPlugin,
180 TUid aImplementationId,
181 const CCryptoParams* aAlgorithmParams);
184 * Creates a new instance of a symmetric cipher
186 * @param aPlugin A reference to a pointer that should be set to point to
187 * the new asymmetric object.
188 * @param aImplementationId The UID of the symmetric cipher plug-in to instantiate.
189 * @param aKey The encryption/decryption key.
190 * @param aCryptoMode Encrypt or Decrypt.
191 * @param aOperationMode the block cipher mode to use ECB, CBC, CTR etc
192 * @param aPadding the padding scheme to use.
193 * @param aAlgorithmParams The parameters that are specific to a particular
194 * algorithm. This is for extendibility and will normally be null.
196 * @leave Function can leave with any system wide error codes in
199 IMPORT_C static void CreateSymmetricCipherL(MSymmetricCipher*& aPlugin,
200 TUid aImplementationId,
205 const CCryptoParams* aAlgorithmParams);
210 #endif // CPLUGINENTRY_H