|
1 /* |
|
2 /* |
|
3 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __TESTCRYPT_H__ |
|
20 #define __TESTCRYPT_H__ |
|
21 |
|
22 #include <test/testexecutestepbase.h> |
|
23 // For file input/output |
|
24 #include <stdio.h> |
|
25 #include <string.h> |
|
26 |
|
27 _LIT(KEncrypt, "Encrypt"); |
|
28 _LIT(KCrypt, "Crypt"); |
|
29 |
|
30 class CTestCrypt : public CTestStep |
|
31 { |
|
32 public: |
|
33 |
|
34 ~CTestCrypt(); |
|
35 CTestCrypt(const TDesC& aStepName); |
|
36 TVerdict doTestStepL(); |
|
37 TVerdict doTestStepPreambleL(); |
|
38 TVerdict doTestStepPostambleL(); |
|
39 |
|
40 private: |
|
41 /* |
|
42 * Test method to test encrypt() API |
|
43 */ |
|
44 virtual TInt Encrypt(); |
|
45 |
|
46 /* |
|
47 * Test method to test crypt() API |
|
48 */ |
|
49 virtual TInt Crypt(); |
|
50 |
|
51 /* |
|
52 * To reposition the file pointer to the line following the |
|
53 * requested string, in this case the "test data ID" |
|
54 */ |
|
55 int RepositionFilePointer(const char *aString); |
|
56 |
|
57 /* |
|
58 * Retrieve's the test data for the encrypt() and setkey() |
|
59 * functions |
|
60 */ |
|
61 TInt GetEncryptTestData(char key[], char block[], int *edflag, char output[]); |
|
62 |
|
63 TInt GetCryptTestData(char[], char[], char[]); |
|
64 |
|
65 |
|
66 private: // Data |
|
67 |
|
68 FILE *iTestDataFile; |
|
69 }; |
|
70 |
|
71 #endif |
|
72 |