First public contribution.
2 * Copyright (c) 2006-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.
22 #include <cryptospi/cryptospidef.h>
24 #include "signerimpl.h"
25 #include "pluginconfig.h"
27 using namespace SoftwareCrypto;
29 CSignerImpl::CSignerImpl()
33 CSignerImpl::~CSignerImpl()
38 void CSignerImpl::Close()
43 void CSignerImpl::Reset()
47 TAny* CSignerImpl::GetExtension(TUid /*aExtensionId*/)
52 void CSignerImpl::GetCharacteristicsL(const TAny*& aPluginCharacteristics)
54 TInt numCiphers = sizeof(KSignerCharacteristics)/sizeof(TAsymmetricSignatureCharacteristics*);
55 TInt32 implUid = ImplementationUid().iUid;
56 for (TInt i = 0; i < numCiphers; ++i)
58 if (KSignerCharacteristics[i]->cmn.iImplementationUID == implUid)
60 aPluginCharacteristics = KSignerCharacteristics[i];
66 void CSignerImpl::DoSetKeyL(const CKey& aPrivateKey)
69 iKey = CKey::NewL(aPrivateKey);
72 void CSignerImpl::ConstructL(const CKey& aPrivateKey)
78 // Methods implemented in subclass. No coverage here.
79 #ifdef _BullseyeCoverage
80 #pragma suppress_warnings on
81 #pragma BullseyeCoverage off
82 #pragma suppress_warnings off
84 void CSignerImpl::SetPaddingModeL(TUid /*aPaddingMode*/)
86 // Override in subclass
87 User::Leave(KErrNotSupported);
90 void CSignerImpl::SetKeyL(const CKey& /*aPrivateKey*/)
92 // Override in subclass
93 User::Leave(KErrNotSupported);
96 TInt CSignerImpl::GetMaximumInputLengthL() const
98 // Override in subclass
99 User::Leave(KErrNotSupported);
103 TInt CSignerImpl::GetMaximumOutputLengthL() const
105 // Override in subclass
106 User::Leave(KErrNotSupported);