sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: */ sl@0: sl@0: #ifndef __TSIGNATUREINPUT_H__ sl@0: #define __TSIGNATUREINPUT_H__ sl@0: sl@0: #include sl@0: #include sl@0: /** An abstract class capable of representing a message to be signed or sl@0: * verified. sl@0: * @publishedPartner sl@0: * @released sl@0: */ sl@0: class CSignatureInput : public CBase sl@0: { sl@0: public: sl@0: virtual void Update(const TDesC8& aInput) = 0; sl@0: virtual TPtrC8 Final(void) = 0; sl@0: protected: sl@0: CSignatureInput(void) {} sl@0: private: sl@0: CSignatureInput(const CSignatureInput&); sl@0: CSignatureInput& operator=(const CSignatureInput&); sl@0: }; sl@0: sl@0: /** sl@0: * @publishedPartner sl@0: * @released sl@0: */ sl@0: class CHashingSignatureInput : public CSignatureInput sl@0: { sl@0: public: sl@0: static CHashingSignatureInput* NewL(CMessageDigest::THashId aHashId); sl@0: static CHashingSignatureInput* NewLC(CMessageDigest::THashId aHashId); sl@0: virtual void Update(const TDesC8& aInput); sl@0: virtual TPtrC8 Final(void); sl@0: ~CHashingSignatureInput(void); sl@0: protected: sl@0: CHashingSignatureInput(void); sl@0: void ConstructL(CMessageDigest::THashId aHashId); sl@0: private: sl@0: CMessageDigest* iHash; sl@0: private: sl@0: CHashingSignatureInput(const CHashingSignatureInput&); sl@0: CHashingSignatureInput& operator=(const CHashingSignatureInput&); sl@0: }; sl@0: sl@0: #endif