crypto/weakcrypto/test/tbigint/tutils.h
changeset 71 dd83586b62d6
equal deleted inserted replaced
66:8873e6835f7b 71:dd83586b62d6
       
     1 /*
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __TUTILS_H__
       
    20 #define __TUTILS_H__
       
    21 
       
    22 #include "t_testaction.h"
       
    23 #include <e32std.h>
       
    24 #include <random.h>
       
    25 
       
    26 class RInteger;
       
    27 class Output;
       
    28 
       
    29 class Utils 
       
    30 	{
       
    31 public:
       
    32 	static void DumpInteger(Output& aOut, const TDesC& aDesc, 
       
    33 		const RInteger& aThat);
       
    34 	};
       
    35 
       
    36 class CRandomSetSource : public CRandom
       
    37 	{
       
    38 public:
       
    39 	CRandomSetSource(const TDesC8& aSource);
       
    40 	virtual void GenerateBytesL(TDes8& aDest);
       
    41 	void SetSource(const TDesC8& aSource);
       
    42 	void Reset(void);
       
    43 
       
    44 private:
       
    45 	TPtrC8 iValue;
       
    46 	TInt iCounter;
       
    47 	};
       
    48 
       
    49 #endif