equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006-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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32def.h> |
|
20 #include <e32cmn.h> |
|
21 #include "keys.h" |
|
22 |
|
23 #include "keypairgenimpl.h" |
|
24 |
|
25 #include <cryptospi/cryptospidef.h> |
|
26 #include <cryptospi/plugincharacteristics.h> |
|
27 #include "pluginconfig.h" |
|
28 |
|
29 #include "common/inlines.h" |
|
30 |
|
31 using namespace SoftwareCrypto; |
|
32 |
|
33 CKeyPairGenImpl::CKeyPairGenImpl() |
|
34 { |
|
35 } |
|
36 |
|
37 void CKeyPairGenImpl::ConstructL() |
|
38 { |
|
39 } |
|
40 |
|
41 CKeyPairGenImpl::~CKeyPairGenImpl() |
|
42 { |
|
43 } |
|
44 |
|
45 void CKeyPairGenImpl::Close() |
|
46 { |
|
47 delete this; |
|
48 } |
|
49 |
|
50 TAny* CKeyPairGenImpl::GetExtension(TUid /*aExtensionId*/) |
|
51 { |
|
52 return 0; |
|
53 } |
|
54 |
|
55 void CKeyPairGenImpl::GetCharacteristicsL(const TAny*& aPluginCharacteristics) |
|
56 { |
|
57 TInt numCiphers = sizeof(KKeyPairGeneratorCharacteristics)/sizeof(TAsymmetricKeypairGeneratorCharacteristics*); |
|
58 TInt32 implUid = ImplementationUid().iUid; |
|
59 for (TInt i = 0; i < numCiphers; ++i) |
|
60 { |
|
61 if (KKeyPairGeneratorCharacteristics[i]->cmn.iImplementationUID == implUid) |
|
62 { |
|
63 aPluginCharacteristics = KKeyPairGeneratorCharacteristics[i]; |
|
64 break; |
|
65 } |
|
66 } |
|
67 } |