Update contrib.
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.
15 * Software md5 implementation
26 #ifndef __CRYPTOAPI_SOFTWAREMD5IMPL_H__
27 #define __CRYPTOAPI_SOFTWAREMD5IMPL_H__
29 #include "softwarehashbase.h"
31 namespace SoftwareCrypto
33 using namespace CryptoSpi;
35 const TInt KMD5BlockSize = 16;
36 const TInt KMD5HashSize = 16;
38 NONSHARABLE_CLASS(CMD5Impl) : public CBase, public MSoftwareHash
42 static CMD5Impl* NewL(TUid aImplementationUid);
43 static CMD5Impl* NewLC(TUid aImplementationUid);
48 void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
49 static CExtendedCharacteristics* CreateExtendedCharacteristicsL();
50 const CExtendedCharacteristics* GetExtendedCharacteristicsL();
51 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 CMD5Impl(TUid aImplementationUid);
70 CMD5Impl(const CMD5Impl& aCMD5Impl);
75 TUid ImplementationUid();
77 void DoUpdate(const TUint8* aData,TUint aLength);
83 TUid iImplementationUid;
85 TBuf8<KMD5HashSize> iHash;
93 TUint iData[KMD5BlockSize];
101 TUint iDataCopy[KMD5BlockSize];
102 CExtendedCharacteristics* iExtendedCharacteristics;
106 #endif // __CRYPTOAPI_SOFTWAREMD5IMPL_H__