os/security/cryptoservices/asnpkcs/test/tpkcs8enc/pkcs8Tester.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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  @file
    23 */
    24 
    25 #ifndef __PKCS8TESTER_H__
    26 #define __PKCS8TESTER_H__
    27 
    28 CASN1EncSequence*  GenerateL(TDesC& fileName);
    29 void GenerateAndSaveL(TDesC& origin, TDesC& destination);
    30 
    31 class Pkcs8Utils 
    32 	{
    33 public:
    34 	/**
    35 	 * Extracts the nPos command line argument.
    36 	 *
    37 	 * @param nPos The position of the command line argument to extract.
    38 	 *
    39 	 * @return A descriptor containing the command line argument.
    40 	 */	
    41 	 static  HBufC* GetArgumentL(TInt nPos);
    42 
    43 	/**
    44 	* Decodes a pkcs8 file
    45 	*
    46 	* @param fileName The name of the file containing the pkcs8 key
    47 	*
    48 	* @return A structure containing the decoded data.
    49 	*/
    50 	 static CDecPKCS8Data* getPkcsDataL(TDesC& fileName);
    51 	
    52 	/**
    53 	* Writes the given ASN1 sequence DER encoded to the given fileName
    54 	*
    55 	* @param fn The file name where the sequecne will be stored.
    56 	* @param seq The ASN1 sequence to write.
    57 	*/
    58 	 static void WriteSequenceL(const TDesC& fn, CASN1EncSequence& seq);
    59 	};
    60 	
    61 #endif