os/security/cryptoservices/certificateandkeymgmt/x500/X500dec.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 1998-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 * TASN1DecX500DirectoryString class implementation
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @internalTechnology
    23 */
    24 
    25 #ifndef __X500DEC_H__
    26 #define __X500DEC_H__
    27 
    28 #include <asn1dec.h>
    29 #include <x520ava.h>
    30 #include <x500dn.h>
    31 
    32 class TASN1DecX500DirectoryString
    33 
    34 	{
    35 public:
    36 	TASN1DecX500DirectoryString();
    37 	HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos, TInt aMaxLength = KMaxTInt);
    38 	HBufC* DecodeDERL(const TASN1DecGeneric& aSource, TInt aMaxLength = KMaxTInt);
    39 	TInt EncodeDER(TDes8& aDestination,TInt& aPos);
    40 	TInt LengthDERContent(void) const;
    41 	void SetMaxLength(TInt aLength);
    42 private:
    43 	HBufC* DecodeContentsL(const TASN1DecGeneric& aSource, TInt aMaxLength);
    44 	TInt iMaxLength;
    45 	};
    46 
    47 #endif