equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-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 |
|
23 /** |
|
24 @file |
|
25 */ |
|
26 |
|
27 #ifndef __PKCS8TESTER_H__ |
|
28 #define __PKCS8TESTER_H__ |
|
29 |
|
30 CASN1EncSequence* GenerateL(TDesC& fileName); |
|
31 void GenerateAndSaveL(TDesC& origin, TDesC& destination); |
|
32 |
|
33 class Pkcs8Utils |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Extracts the nPos command line argument. |
|
38 * |
|
39 * @param nPos The position of the command line argument to extract. |
|
40 * |
|
41 * @return A descriptor containing the command line argument. |
|
42 */ |
|
43 static HBufC* GetArgumentL(TInt nPos); |
|
44 |
|
45 /** |
|
46 * Decodes a pkcs8 file |
|
47 * |
|
48 * @param fileName The name of the file containing the pkcs8 key |
|
49 * |
|
50 * @return A structure containing the decoded data. |
|
51 */ |
|
52 static CDecPKCS8Data* getPkcsDataL(TDesC& fileName); |
|
53 |
|
54 /** |
|
55 * Writes the given ASN1 sequence DER encoded to the given fileName |
|
56 * |
|
57 * @param fn The file name where the sequecne will be stored. |
|
58 * @param seq The ASN1 sequence to write. |
|
59 */ |
|
60 static void WriteSequenceL(const TDesC& fn, CASN1EncSequence& seq); |
|
61 }; |
|
62 |
|
63 #endif |