crypto/weakcryptospi/test/tcryptospi/src/symmetriccipherstepbase.h
changeset 8 35751d3474b7
child 43 2f10d260163b
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-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 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalTechnology
       
    24 */
       
    25 #ifndef SYMMETRICCIPHERSTEPBASE_H
       
    26 #define SYMMETRICCIPHERSTEPBASE_H
       
    27 
       
    28 #include "cryptosymmetriccipherapi.h"
       
    29 #include "keys.h"
       
    30 #include "te_cryptospistepbase.h"
       
    31 #include "filereader.h"
       
    32 
       
    33 using namespace CryptoSpi;
       
    34 
       
    35 class CSymmetricCipherStepBase : public CTe_CryptoSpiStepBase
       
    36 	{
       
    37 protected:
       
    38 	void SetupCipherL(TBool aArc4Check, TBool aRc2Check, TVariantPtrC& aOperationMode, CSymmetricCipher*& aCipher, CKey*& aKey);
       
    39 	HBufC8* ReadInPlaintextL();
       
    40 	HBufC8* ReadInCiphertextL();
       
    41 	HBufC8* ReadInIvL();
       
    42 	TInt CtrModeCalcBlockSizeL(CSymmetricCipher& aCipher);
       
    43 	HBufC8* CtrModeIncrementCounterL(TDesC8& aCounter);
       
    44 	HBufC8* ReadInHexCiphertextL();
       
    45 	HBufC8* ReadInHexPlaintextL();
       
    46 	HBufC8* ReadInHexPlainTextL(TPtrC aFile);
       
    47 	HBufC8* ReadInHexIvL();
       
    48 	HBufC8* ConvertFromHexFormatToRawL(TDesC8& aInput);
       
    49 	
       
    50 private:
       
    51 	HBufC8* ReadFileL(TPtrC aFile);
       
    52 	};
       
    53 
       
    54 #endif	//SYMMETRICCIPHERSTEPBASE_H