williamr@4
|
1 |
/*
|
williamr@4
|
2 |
* Copyright (c) 2006-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 |
* plugin selector interface
|
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 |
|
williamr@4
|
26 |
#ifndef __CRYPTOAPI_PLUGINSELECTORBASE_H__
|
williamr@4
|
27 |
#define __CRYPTOAPI_PLUGINSELECTORBASE_H__
|
williamr@4
|
28 |
|
williamr@4
|
29 |
#include <e32base.h>
|
williamr@4
|
30 |
|
williamr@4
|
31 |
|
williamr@4
|
32 |
namespace CryptoSpi
|
williamr@4
|
33 |
{
|
williamr@4
|
34 |
class CHash;
|
williamr@4
|
35 |
class CRandom;
|
williamr@4
|
36 |
class CSymmetricCipher;
|
williamr@4
|
37 |
class CAsymmetricCipher;
|
williamr@4
|
38 |
class CSigner;
|
williamr@4
|
39 |
class CVerifier;
|
williamr@4
|
40 |
class CKeyAgreement;
|
williamr@4
|
41 |
class CKeyPairGenerator;
|
williamr@4
|
42 |
class CAsyncHash;
|
williamr@4
|
43 |
class CAsyncRandom;
|
williamr@4
|
44 |
class CAsyncSymmetricCipher;
|
williamr@4
|
45 |
class CAsyncAsymmetricCipher;
|
williamr@4
|
46 |
class CAsyncSigner;
|
williamr@4
|
47 |
class CAsyncVerifier;
|
williamr@4
|
48 |
class CAsyncKeyAgreement;
|
williamr@4
|
49 |
class CAsyncKeyPairGenerator;
|
williamr@4
|
50 |
class CKey;
|
williamr@4
|
51 |
class CCryptoParams;
|
williamr@4
|
52 |
|
williamr@4
|
53 |
|
williamr@4
|
54 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
williamr@4
|
55 |
class CMac;
|
williamr@4
|
56 |
class CAsyncMac;
|
williamr@4
|
57 |
#endif
|
williamr@4
|
58 |
|
williamr@4
|
59 |
/**
|
williamr@4
|
60 |
Base class for the selectors
|
williamr@4
|
61 |
*/
|
williamr@4
|
62 |
class MPluginSelector
|
williamr@4
|
63 |
{
|
williamr@4
|
64 |
public:
|
williamr@4
|
65 |
/**
|
williamr@4
|
66 |
Destructor
|
williamr@4
|
67 |
*/
|
williamr@4
|
68 |
inline virtual ~MPluginSelector() = 0;
|
williamr@4
|
69 |
|
williamr@4
|
70 |
/**
|
williamr@4
|
71 |
* @deprecated
|
williamr@4
|
72 |
*
|
williamr@4
|
73 |
* Create a new instance of a hash object
|
williamr@4
|
74 |
*
|
williamr@4
|
75 |
* @param aHash The pointer to CHash
|
williamr@4
|
76 |
* @param aAlgorithmUid The specific hash algorithm e.g. MD2, SHA1
|
williamr@4
|
77 |
* @param aOperationMode The operation mode of the hash e.g. Hash mode, Hmac mode
|
williamr@4
|
78 |
* @param aKey The key for Hmac mode, which should be NULL in Hash mode
|
williamr@4
|
79 |
* @param aAlgorithmParams The parameters that are specific to a particular
|
williamr@4
|
80 |
* algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
81 |
* @leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
82 |
*/
|
williamr@4
|
83 |
virtual void CreateHashL(CHash*& aHash,
|
williamr@4
|
84 |
TUid aAlgorithmUid,
|
williamr@4
|
85 |
TUid aOperationMode,
|
williamr@4
|
86 |
const CKey* aKey,
|
williamr@4
|
87 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
88 |
|
williamr@4
|
89 |
/**
|
williamr@4
|
90 |
Creates a new instance of a Random object.
|
williamr@4
|
91 |
|
williamr@4
|
92 |
@param aRandom A reference to a pointer that should be set to point to the new CRandom object.
|
williamr@4
|
93 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
94 |
@param aAlgorithmParams Parameters that are specific this algorithm.
|
williamr@4
|
95 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
96 |
*/
|
williamr@4
|
97 |
virtual void CreateRandomL(CRandom*& aRandom,
|
williamr@4
|
98 |
TUid aAlgorithmUid,
|
williamr@4
|
99 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
100 |
|
williamr@4
|
101 |
/**
|
williamr@4
|
102 |
Creates a new synchronous instance of a symmetric cipher
|
williamr@4
|
103 |
|
williamr@4
|
104 |
@param aCipher A reference to a pointer that should be set to point to the new symmetric object.
|
williamr@4
|
105 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
106 |
@param aKey The encryption/decryption key.
|
williamr@4
|
107 |
@param aCryptoMode The Symmetric cipher mode.
|
williamr@4
|
108 |
@param aOperationMode The Symmetric cipher operation mode.
|
williamr@4
|
109 |
@param aPaddingMode The Symmetric cipher padding mode.
|
williamr@4
|
110 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
111 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
112 |
*/
|
williamr@4
|
113 |
virtual void CreateSymmetricCipherL(CSymmetricCipher*& aCipher,
|
williamr@4
|
114 |
TUid aAlgorithmUid,
|
williamr@4
|
115 |
const CKey& aKey,
|
williamr@4
|
116 |
TUid aCryptoMode,
|
williamr@4
|
117 |
TUid aOperationMode,
|
williamr@4
|
118 |
TUid aPaddingMode,
|
williamr@4
|
119 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
120 |
|
williamr@4
|
121 |
/**
|
williamr@4
|
122 |
Creates a new instance of an asymmetric cipher
|
williamr@4
|
123 |
|
williamr@4
|
124 |
@param aCipher A reference to a pointer that should be set to point to the new asymmetric cipher object.
|
williamr@4
|
125 |
@param aAlgorithmUid The asymmetric cipher algorithm to use (e.g. KRsaCipherUid)
|
williamr@4
|
126 |
@param aKey The encryption/decryption key.
|
williamr@4
|
127 |
@param aCryptoMode whether to encrypt or decrypt
|
williamr@4
|
128 |
@param aPaddingMode The padding mode to use
|
williamr@4
|
129 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
130 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
131 |
*/
|
williamr@4
|
132 |
virtual void CreateAsymmetricCipherL(CAsymmetricCipher*& aCipher,
|
williamr@4
|
133 |
TUid aAlgorithmUid,
|
williamr@4
|
134 |
const CKey& aKey,
|
williamr@4
|
135 |
TUid aCryptoMode,
|
williamr@4
|
136 |
TUid aPaddingMode,
|
williamr@4
|
137 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
138 |
|
williamr@4
|
139 |
/**
|
williamr@4
|
140 |
Creates a new instance of a synchronous signer.
|
williamr@4
|
141 |
|
williamr@4
|
142 |
@param aSigner A reference to a pointer that should be set to point to the new signer object.
|
williamr@4
|
143 |
@param aAlgorithmUid The algorithm to use.
|
williamr@4
|
144 |
@param aKey The signing key.
|
williamr@4
|
145 |
@param aPaddingMode The padding mode of the signer.
|
williamr@4
|
146 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
147 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
148 |
*/
|
williamr@4
|
149 |
virtual void CreateSignerL(CSigner*& aSigner,
|
williamr@4
|
150 |
TUid aAlgorithmUid,
|
williamr@4
|
151 |
const CKey& aKey,
|
williamr@4
|
152 |
TUid aPaddingMode,
|
williamr@4
|
153 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
154 |
|
williamr@4
|
155 |
/**
|
williamr@4
|
156 |
Creates a new instance of a verifier.
|
williamr@4
|
157 |
|
williamr@4
|
158 |
@param aVerifier A reference to a pointer that should be set to point to the new verifier object.
|
williamr@4
|
159 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
160 |
@param aKey The key to verify the signature with.
|
williamr@4
|
161 |
@param aPaddingMode The padding mode of the signer.
|
williamr@4
|
162 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
163 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
164 |
*/
|
williamr@4
|
165 |
virtual void CreateVerifierL(CVerifier*& aVerifier,
|
williamr@4
|
166 |
TUid aAlgorithmUid,
|
williamr@4
|
167 |
const CKey& aKey,
|
williamr@4
|
168 |
TUid aPaddingMode,
|
williamr@4
|
169 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
170 |
|
williamr@4
|
171 |
/**
|
williamr@4
|
172 |
Creates a new instance of a key pair generator.
|
williamr@4
|
173 |
|
williamr@4
|
174 |
@param aKeyPairGenerator A reference to a pointer that should be set to point to the new asymmetric key pair generator object.
|
williamr@4
|
175 |
@param aKeyAlgorithmUid The algorithm UID
|
williamr@4
|
176 |
@param aAlgorithmParams The parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
177 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
178 |
*/
|
williamr@4
|
179 |
virtual void CreateKeyPairGeneratorL(CKeyPairGenerator*& aKeyPairGenerator,
|
williamr@4
|
180 |
TUid aKeyAlgorithmUid,
|
williamr@4
|
181 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
182 |
|
williamr@4
|
183 |
|
williamr@4
|
184 |
/**
|
williamr@4
|
185 |
Creates a new instance of a key agreement system.
|
williamr@4
|
186 |
|
williamr@4
|
187 |
@param aKeyAgreement A reference to a pointer that should be set to point to the new key agreement object.
|
williamr@4
|
188 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
189 |
@param aPrivateKey The private key to combine with the other parties public key during the agreement.
|
williamr@4
|
190 |
@param aAlgorithmParams The parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
191 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
192 |
*/
|
williamr@4
|
193 |
virtual void CreateKeyAgreementL(CKeyAgreement*& aKeyAgreement,
|
williamr@4
|
194 |
TUid aAlgorithmUid,
|
williamr@4
|
195 |
const CKey& aPrivateKey,
|
williamr@4
|
196 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
197 |
|
williamr@4
|
198 |
/**
|
williamr@4
|
199 |
* @deprecated
|
williamr@4
|
200 |
*
|
williamr@4
|
201 |
* Create a new instance of a asynchronous hash object
|
williamr@4
|
202 |
*
|
williamr@4
|
203 |
* @param aHash The pointer to CHash
|
williamr@4
|
204 |
* @param aAlgorithmUid The specific hash algorithm e.g. MD2, SHA1
|
williamr@4
|
205 |
* @param aOperationMode The operation mode of the hash e.g. Hash mode, Hmac mode
|
williamr@4
|
206 |
* @param aKey The key for Hmac mode, which should be NULL in Hash mode
|
williamr@4
|
207 |
* @param aAlgorithmParams The parameters that are specific to a particular
|
williamr@4
|
208 |
* algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
209 |
* @leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
210 |
*/
|
williamr@4
|
211 |
virtual void CreateAsyncHashL(CAsyncHash*& aHash,
|
williamr@4
|
212 |
TUid aAlgorithmUid,
|
williamr@4
|
213 |
TUid aOperationMode,
|
williamr@4
|
214 |
const CKey* aKey,
|
williamr@4
|
215 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
216 |
/**
|
williamr@4
|
217 |
Creates a new instance of a asynchronous random object.
|
williamr@4
|
218 |
|
williamr@4
|
219 |
@param aRandom A reference to a pointer that should be set to point to the new CRandom object.
|
williamr@4
|
220 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
221 |
@param aAlgorithmParams Parameters that are specific this algorithm.
|
williamr@4
|
222 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
223 |
*/
|
williamr@4
|
224 |
virtual void CreateAsyncRandomL(CAsyncRandom*& aRandom,
|
williamr@4
|
225 |
TUid aAlgorithmUid,
|
williamr@4
|
226 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
227 |
/**
|
williamr@4
|
228 |
Creates a new synchronous instance of a asynchronous symmetric cipher
|
williamr@4
|
229 |
|
williamr@4
|
230 |
@param aCipher A reference to a pointer that should be set to point to the new symmetric object.
|
williamr@4
|
231 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
232 |
@param aKey The encryption/decryption key.
|
williamr@4
|
233 |
@param aCryptoMode The Symmetric cipher mode.
|
williamr@4
|
234 |
@param aOperationMode The Symmetric cipher operation mode.
|
williamr@4
|
235 |
@param aPaddingMode The Symmetric cipher padding mode.
|
williamr@4
|
236 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
237 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
238 |
*/
|
williamr@4
|
239 |
virtual void CreateAsyncSymmetricCipherL(CAsyncSymmetricCipher*& aCipher,
|
williamr@4
|
240 |
TUid aAlgorithmUid,
|
williamr@4
|
241 |
const CKey& aKey,
|
williamr@4
|
242 |
TUid aCryptoMode,
|
williamr@4
|
243 |
TUid aOperationMode,
|
williamr@4
|
244 |
TUid aPaddingMode,
|
williamr@4
|
245 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
246 |
|
williamr@4
|
247 |
/**
|
williamr@4
|
248 |
Creates a new instance of an asynchronous asymmetric cipher
|
williamr@4
|
249 |
|
williamr@4
|
250 |
@param aCipher A reference to a pointer that should be set to point to the new asymmetric cipher object.
|
williamr@4
|
251 |
@param aAlgorithmUid The asymmetric cipher algorithm to use (e.g. KRsaCipherUid)
|
williamr@4
|
252 |
@param aKey The encryption/decryption key.
|
williamr@4
|
253 |
@param aCryptoMode whether to encrypt or decrypt
|
williamr@4
|
254 |
@param aPaddingMode The padding mode to use
|
williamr@4
|
255 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
256 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
257 |
*/
|
williamr@4
|
258 |
virtual void CreateAsyncAsymmetricCipherL(CAsyncAsymmetricCipher*& aCipher,
|
williamr@4
|
259 |
TUid aAlgorithmUid,
|
williamr@4
|
260 |
const CKey& aKey,
|
williamr@4
|
261 |
TUid aCryptoMode,
|
williamr@4
|
262 |
TUid aPaddingMode,
|
williamr@4
|
263 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
264 |
/**
|
williamr@4
|
265 |
Creates a new instance of a asynchronous signer.
|
williamr@4
|
266 |
|
williamr@4
|
267 |
@param aSigner A reference to a pointer that should be set to point to the new signer object.
|
williamr@4
|
268 |
@param aAlgorithmUid The algorithm to use.
|
williamr@4
|
269 |
@param aKey The signing key.
|
williamr@4
|
270 |
@param aPaddingMode The padding mode of the signer.
|
williamr@4
|
271 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
272 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
273 |
*/
|
williamr@4
|
274 |
virtual void CreateAsyncSignerL(CAsyncSigner*& aSigner,
|
williamr@4
|
275 |
TUid aAlgorithmUid,
|
williamr@4
|
276 |
const CKey& aKey,
|
williamr@4
|
277 |
TUid aPaddingMode,
|
williamr@4
|
278 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
279 |
/**
|
williamr@4
|
280 |
Creates a new instance of a asynchronous verifier.
|
williamr@4
|
281 |
|
williamr@4
|
282 |
@param aVerifier A reference to a pointer that should be set to point to the new verifier object.
|
williamr@4
|
283 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
284 |
@param aKey The key to verify the signature with.
|
williamr@4
|
285 |
@param aPaddingMode The padding mode of the signer.
|
williamr@4
|
286 |
@param aAlgorithmParams Parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
287 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
288 |
*/
|
williamr@4
|
289 |
virtual void CreateAsyncVerifierL(CAsyncVerifier*& aVerifier,
|
williamr@4
|
290 |
TUid aAlgorithmUid,
|
williamr@4
|
291 |
const CKey& aKey,
|
williamr@4
|
292 |
TUid aPaddingMode,
|
williamr@4
|
293 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
294 |
|
williamr@4
|
295 |
/**
|
williamr@4
|
296 |
Creates a new instance of a asynchronous key pair generator.
|
williamr@4
|
297 |
|
williamr@4
|
298 |
@param aKeyPairGenerator A reference to a pointer that should be set to point to the new asymmetric key pair generator object.
|
williamr@4
|
299 |
@param aKeyAlgorithmUid The algorithm UID
|
williamr@4
|
300 |
@param aAlgorithmParams The parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
301 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
302 |
*/
|
williamr@4
|
303 |
virtual void CreateAsyncKeyPairGeneratorL(CAsyncKeyPairGenerator*& aKeyPairGenerator,
|
williamr@4
|
304 |
TUid aAlgorithmUid,
|
williamr@4
|
305 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
306 |
|
williamr@4
|
307 |
/**
|
williamr@4
|
308 |
Creates a new instance of a asynchronous key agreement system.
|
williamr@4
|
309 |
|
williamr@4
|
310 |
@param aKeyAgreement A reference to a pointer that should be set to point to the new key agreement object.
|
williamr@4
|
311 |
@param aAlgorithmUid The algorithm to use
|
williamr@4
|
312 |
@param aPrivateKey The private key to combine with the other parties public key during the agreement.
|
williamr@4
|
313 |
@param aAlgorithmParams The parameters that are specific to a particular algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
314 |
@leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
315 |
*/
|
williamr@4
|
316 |
virtual void CreateAsyncKeyAgreementL(CAsyncKeyAgreement*& aKeyAgreement,
|
williamr@4
|
317 |
TUid aAlgorithmUid,
|
williamr@4
|
318 |
const CKey& aPrivateKey,
|
williamr@4
|
319 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
320 |
|
williamr@4
|
321 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
williamr@4
|
322 |
|
williamr@4
|
323 |
/**
|
williamr@4
|
324 |
* Create a CMac instance (for software based MAC plug-in dll implementation)
|
williamr@4
|
325 |
*
|
williamr@4
|
326 |
* @param aMac The pointer to CMac. This will be initialised with
|
williamr@4
|
327 |
* the plug-in implementation of the desired MAC algorithm.
|
williamr@4
|
328 |
* @param aAlgorithmUid The specific MAC algorithm desired for evaluation of MAC value.
|
williamr@4
|
329 |
* e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
|
williamr@4
|
330 |
* @param aKey Symmetric key for calculating message authentication code value.
|
williamr@4
|
331 |
* @param aAlgorithmParams The parameters those are specific to a particular MAC algorithm.
|
williamr@4
|
332 |
* This is for extendibility and will normally be null.
|
williamr@4
|
333 |
* @leave KErrNone if successful; otherwise, leaves with a system wide error code.
|
williamr@4
|
334 |
*/
|
williamr@4
|
335 |
virtual void CreateMacL(CMac*& aMac,
|
williamr@4
|
336 |
const TUid aAlgorithmUid,
|
williamr@4
|
337 |
const CKey& aKey,
|
williamr@4
|
338 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
339 |
|
williamr@4
|
340 |
/**
|
williamr@4
|
341 |
* Create a CAsyncMac instance (for hardware based MAC plug-in dll implementation)
|
williamr@4
|
342 |
*
|
williamr@4
|
343 |
* @param aMac The pointer to CMac. This will be initialised with
|
williamr@4
|
344 |
* the plug-in implementation of the desired MAC algorithm.
|
williamr@4
|
345 |
* @param aAlgorithmUid The specific MAC algorithm desired for evaluation of MAC value.
|
williamr@4
|
346 |
* e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
|
williamr@4
|
347 |
* @param aKey Symmetric key for calculating message authentication code value.
|
williamr@4
|
348 |
* @param aAlgorithmParams The parameters those are specific to a particular MAC algorithm.
|
williamr@4
|
349 |
* This is for extendibility and will normally be null.
|
williamr@4
|
350 |
* @leave KErrNone if successful; otherwise, leaves with a system wide error code.
|
williamr@4
|
351 |
*/
|
williamr@4
|
352 |
virtual void CreateAsyncMacL(CAsyncMac*& aMac,
|
williamr@4
|
353 |
const TUid aAlgorithmUid,
|
williamr@4
|
354 |
const CKey& aKey,
|
williamr@4
|
355 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
356 |
|
williamr@4
|
357 |
/**
|
williamr@4
|
358 |
* Create a CHash instance
|
williamr@4
|
359 |
*
|
williamr@4
|
360 |
* @param aHash The pointer to CHash
|
williamr@4
|
361 |
* @param aAlgorithmUid The specific hash algorithm e.g. MD2, SHA1, MD4
|
williamr@4
|
362 |
* @param aAlgorithmParams The parameters that are specific to a particular
|
williamr@4
|
363 |
* algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
364 |
* @leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
365 |
*/
|
williamr@4
|
366 |
virtual void CreateHashL(CHash*& aHash,
|
williamr@4
|
367 |
TUid aAlgorithmUid,
|
williamr@4
|
368 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
369 |
|
williamr@4
|
370 |
/**
|
williamr@4
|
371 |
* Create a CAsyncHash instance
|
williamr@4
|
372 |
*
|
williamr@4
|
373 |
* @param aAsyncHash The pointer to CAsyncHash
|
williamr@4
|
374 |
* @param aAlgorithmUid The specific hash algorithm e.g. MD2, SHA1, MD4
|
williamr@4
|
375 |
* @param aAlgorithmParams The parameters that are specific to a particular
|
williamr@4
|
376 |
* algorithm. This is for extendibility and will normally be null.
|
williamr@4
|
377 |
* @leave KErrNone if successful; otherwise, a system wide error code.
|
williamr@4
|
378 |
*/
|
williamr@4
|
379 |
virtual void CreateAsyncHashL(CAsyncHash*& aAsyncHash,
|
williamr@4
|
380 |
TUid aAlgorithmUid,
|
williamr@4
|
381 |
const CCryptoParams* aAlgorithmParams) = 0;
|
williamr@4
|
382 |
|
williamr@4
|
383 |
#endif
|
williamr@4
|
384 |
};
|
williamr@4
|
385 |
|
williamr@4
|
386 |
MPluginSelector::~MPluginSelector()
|
williamr@4
|
387 |
{
|
williamr@4
|
388 |
}
|
williamr@4
|
389 |
}
|
williamr@4
|
390 |
#endif //__CRYPTOAPI_PLUGINSELECTORBASE_H__
|
williamr@4
|
391 |
|
williamr@4
|
392 |
|