cryptoservices/certificateandkeymgmt/asn1/base128enc.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2001-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 * Declare TASN1EncBase128DER class.
       
    16 * Declare TASN1EncBase128DER class.  This encodes a given integer base 128,
       
    17 * most significant digits first, with the top bit set 1 on every
       
    18 * octet except the last.
       
    19 * The DER encoding of numbers in base 128 is common both the the encoding
       
    20 * of the tag number in high-tag-number form, and to the DER encoding of OID terms,
       
    21 * hence this class to encapsulate this commonality.
       
    22 *
       
    23 */
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 /**
       
    29  @file 
       
    30  @internalComponent 
       
    31 */
       
    32 
       
    33 #include <e32std.h>
       
    34 
       
    35 class TASN1EncBase128DER
       
    36 	{
       
    37 public:
       
    38 	TASN1EncBase128DER(TUint aInt);
       
    39 
       
    40 	TUint LengthDER() const;
       
    41 	void WriteDERL(TDes8& aBuf, TUint& aPos) const;
       
    42 
       
    43 private:
       
    44 	void CalculateLengthDER();
       
    45 
       
    46 	TUint iInt;
       
    47 	TUint iLengthDER;
       
    48 	};