1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/crypto/weakcrypto/test/thash/hashtestutils.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 + @file
1.26 +*/
1.27 +
1.28 +
1.29 +#include <e32test.h>
1.30 +#include <hash.h>
1.31 +#include <f32file.h>
1.32 +
1.33 +//TBool gMD2Test=ETrue;
1.34 +//TBool gMD5Test=ETrue;
1.35 +//TBool gSHATest=ETrue;
1.36 +//TBool gSHA1Test=ETrue;
1.37 +//TBool gHMACTest=ETrue;
1.38 +//TBool gErrorTest=ETrue;
1.39 +//TBool gPerformanceTest=ETrue;
1.40 +//TBool gVectorTest=ETrue;
1.41 +//TBool gLogging=ETrue;
1.42 +//TBool gFunctionalityTest=ETrue;
1.43 +//TBool gBugs=ETrue;
1.44 +//TBool gFixed=ETrue;
1.45 +//TBool gUnfixed=EFalse;
1.46 +
1.47 +
1.48 +class CTestData:public CBase
1.49 +
1.50 + {
1.51 + public:
1.52 + static CTestData* NewL(const TDesC& aFilename);
1.53 + enum TType { EMessage, EData, EFinished,EFileName,EError=-1 } ;
1.54 + TType Type(void);
1.55 + HBufC* Message(void);
1.56 + HBufC8* operator [] (TInt aIndex);
1.57 + ~CTestData(void);
1.58 + private:
1.59 + CTestData(void);
1.60 + TInt iCurrentPlace;
1.61 + void ConstructL(const TDesC& aFilename);
1.62 + HBufC8* iLine;
1.63 + HBufC8* iFile;
1.64 + };
1.65 +
1.66 +
1.67 +class CTestConsole:public CConsoleBase
1.68 +
1.69 + {
1.70 + public:
1.71 + static CTestConsole* NewL(CConsoleBase* aCon);
1.72 + TInt Create(const TDesC16& aTitle,TSize aSize) {return iCon->Create(aTitle,aSize);};
1.73 + void Read(TRequestStatus& aStatus) {iCon->Read(aStatus);};
1.74 + void ReadCancel(void) {iCon->ReadCancel();};
1.75 + void Write(const TDesC16& aString);
1.76 + TPoint CursorPos(void) const {return iCon->CursorPos();};
1.77 + void SetCursorPosAbs(const TPoint& aPos) {iCon->SetCursorPosAbs(aPos);};
1.78 + void SetCursorPosRel(const TPoint& aPos) {iCon->SetCursorPosRel(aPos);};
1.79 + void SetCursorHeight(TInt aHeight) {iCon->SetCursorHeight(aHeight);};
1.80 + void SetTitle(const TDesC16& aTitle) {iCon->SetTitle(aTitle);};
1.81 + void ClearScreen(void) {iCon->ClearScreen();};
1.82 + void ClearToEndOfLine(void) {iCon->ClearToEndOfLine();};
1.83 + TSize ScreenSize(void) const {return iCon->ScreenSize();};
1.84 + TKeyCode KeyCode(void) const {return iCon->KeyCode();};
1.85 + TUint KeyModifiers(void) const {return iCon->KeyModifiers();};
1.86 + ~CTestConsole(void);
1.87 + void SetLogFile(RFile* aFile);
1.88 + private:
1.89 + CTestConsole(void);
1.90 + CConsoleBase* iCon;
1.91 + RFile* iFile;
1.92 + };
1.93 +