sl@0: /* sl@0: * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef _TPADDINGPKCS7_H_ sl@0: #define _TPADDINGPKCS7_H_ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: sl@0: #include sl@0: #include "tpaddingTestSteps.h" sl@0: sl@0: _LIT(KPadPKCS7, "PadPKCS7"); sl@0: _LIT(KUnpadPKCS7, "UnpadPKCS7"); sl@0: _LIT(KUnpadCorruptPKCS7, "UnpadCorruptPKCS7"); sl@0: _LIT(KPaddingCorruptPKCS7, "PaddingCorruptPKCS7"); sl@0: sl@0: sl@0: class CTestPadPKCS7 : public CPaddingStep sl@0: { sl@0: public: sl@0: CTestPadPKCS7(); sl@0: ~CTestPadPKCS7(); sl@0: virtual TVerdict doTestStepL(); sl@0: private: sl@0: void TestPKCS7Padding(TInt aBlockSize); sl@0: }; sl@0: sl@0: class CTestUnpadPKCS7 : public CPaddingStep sl@0: { sl@0: public: sl@0: CTestUnpadPKCS7(); sl@0: ~CTestUnpadPKCS7(); sl@0: virtual TVerdict doTestStepL(); sl@0: private: sl@0: void TestPKCS7Unpadding(TInt aBlockSize); sl@0: sl@0: }; sl@0: sl@0: class CTestUnpadCorruptPKCS7 : public CPaddingStep sl@0: { sl@0: public: sl@0: CTestUnpadCorruptPKCS7(); sl@0: ~CTestUnpadCorruptPKCS7(); sl@0: virtual TVerdict doTestStepL(); sl@0: private: sl@0: void TestCorruptPKCS7Unpadding(TInt aBlockSize, TInt aTextSize, TUint8 aCorruptPaddingByte); sl@0: }; sl@0: sl@0: class CTestPaddingCorruptPKCS7 : public CPaddingStep sl@0: { sl@0: public: sl@0: CTestPaddingCorruptPKCS7(); sl@0: ~CTestPaddingCorruptPKCS7(); sl@0: virtual TVerdict doTestStepL(); sl@0: private: sl@0: void TestCorruptPKCS7padding(TInt aBlockSize, TInt aTextSize); sl@0: }; sl@0: sl@0: #endif