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.
19 #ifndef __DSASIGNERIMPL_H__
20 #define __DSASIGNERIMPL_H__
30 #include <cryptospi/cryptospidef.h>
32 #include "signerimpl.h"
33 #include "common/inlines.h"
36 * Implementation of DSA signing
38 namespace SoftwareCrypto
40 using namespace CryptoSpi;
42 NONSHARABLE_CLASS(CDSASignerImpl) : public CSignerImpl
46 Creates an instance of a DSA signer plug-in.
47 @param aKey The private key used to sign.
48 @return A pointer to a CDSASignerImpl instance
50 static CDSASignerImpl* NewL(const CKey& aKey);
53 Creates an instance of a DSA signer plug-in.
54 @param aKey The private key used to sign.
55 @return A pointer to a CDSASignerImpl instance
57 static CDSASignerImpl* NewLC(const CKey& aKey);
59 // Override CSignerImpl virtual functions
60 TUid ImplementationUid() const;
63 // Override MSignatureBase virtual functions
64 void SetKeyL(const CKey& aPrivateKey);
65 TInt GetMaximumInputLengthL() const;
66 // End of MSignatureBase
68 // Override MSigner virtual functions
69 void SignL(const TDesC8& aInput, CCryptoParams& aSignature);
72 const CExtendedCharacteristics* GetExtendedCharacteristicsL();
73 static CExtendedCharacteristics* CreateExtendedCharacteristicsL();
83 /// second phase of construction
84 virtual void ConstructL(const CKey& aKey);
87 static const TUint KSha1HashLength = 20;
91 #endif // __DSASIGNERIMPL_H__