First public contribution.
2 * Copyright (c) 2007-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.
28 #ifndef __CRYPTOAPI_SOFTWARESHA2IMPL_H_
29 #define __CRYPTOAPI_SOFTWARESHA2IMPL_H_
32 #include "softwarehashbase.h"
34 namespace SoftwareCrypto
36 using namespace CryptoSpi;
39 NONSHARABLE_CLASS(CSHA2Impl) : public CBase, public MSoftwareHash
43 static CSHA2Impl* NewL(TInt32 aAlgorithmId);
44 static CSHA2Impl* NewLC(TInt32 aAlgorithmId);
49 void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
50 static CExtendedCharacteristics* CreateExtendedCharacteristicsL();
51 const CExtendedCharacteristics* GetExtendedCharacteristicsL();
52 TAny* GetExtension(TUid aExtensionId);
55 TPtrC8 Hash(const TDesC8& aMessage);
56 void Update(const TDesC8& aMessage);
57 TPtrC8 Final(const TDesC8& aMessage);
60 void SetKeyL(const CKey& aKey);
61 void SetOperationModeL(TUid aOperationMode);
69 void ConstructL(TInt32 aAlgorithmId);
70 void ConstructL(const CSHA2Impl& aSHA512Impl);
75 TUid ImplementationUid();
78 MSHA2Impl* iImplementation;
79 const TAny* iInitValues;
80 TUid iImplementationUid;
85 #endif //__CRYPTOAPI_SOFTWARESHA2IMPL_H_