os/security/cryptoservices/certificateandkeymgmt/wtlscert/wtlsdec.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) 1997-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 * TWTLSDecVector class implementation
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @internalTechnology
    23 */
    24 
    25 #ifndef __WTLSDEC_H__
    26 #define __WTLSDEC_H__
    27 
    28 #include <e32base.h>
    29 #include <e32std.h>
    30 #include <bigint.h>
    31 
    32 //implementation of decoder for variable length vector
    33 class TWTLSDecVector
    34 	{
    35 public:
    36 	TWTLSDecVector(const TDesC8& aSource, TInt aMinLength, TInt aMaxLength);
    37 	void InitL();
    38 
    39 //	TPtrC8 Encoding() const;
    40 	TInt EncodingLength() const;
    41 	
    42 //	TPtrC8 Content() const;
    43 //	TInt ContentLength() const;
    44 	
    45 //	TInt HeaderLength() const;
    46 private:
    47 	const TPtrC8 iEncoding;
    48 	const TInt iMinLength;
    49 	const TInt iMaxLength;
    50 	TInt iLengthOfContents;
    51 	TInt iLengthOfLength;
    52 	};
    53 
    54 class TWTLSDecUnsignedInteger
    55 	{
    56 public:
    57 	TWTLSDecUnsignedInteger();
    58 	TInt DecodeShortL(const TDesC8& aSource,TInt& aPos, TInt aLengthOfLength);
    59 	RInteger DecodeLongL(const TDesC8& aSource,TInt& aPos, TInt aLength);
    60 	};
    61 
    62 class TWTLSDecTime
    63 	{
    64 public:
    65 	TWTLSDecTime();
    66 	TTime DecodeL(const TDesC8& aSource, TInt& aPos);
    67 	};
    68 
    69 #endif