kerneltest/f32test/loader/t_hash.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // f32test\loader\security\t_hash.h
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 const TUint SHA1_LBLOCK=16;
       
    22 const TUint SHA1_HASH=20;
       
    23 
       
    24 
       
    25 class CSHA1:public CBase
       
    26 	{
       
    27 public:
       
    28 		static CSHA1* NewL(void);
       
    29 		void Update(const TDesC8& aMessage);
       
    30 		TPtrC8 Final(void);
       
    31 		~CSHA1(void);
       
    32 		void Reset(void);
       
    33 	private:
       
    34 		CSHA1(void);
       
    35 		TUint iA;
       
    36 		TUint iB;
       
    37 		TUint iC;
       
    38 		TUint iD;
       
    39 		TUint iE;
       
    40 		TBuf8<SHA1_HASH> iHash;
       
    41 		TUint iNl;
       
    42 		TUint iNh;
       
    43 		TUint iData[SHA1_LBLOCK*5];
       
    44 		void DoUpdate(const TUint8* aData,TUint aLength);
       
    45 		void DoFinal(void);
       
    46 		void Block();
       
    47 		void ConstructL(void);
       
    48 		TUint8* iTempData;
       
    49 	};