os/security/cryptoservices/certificateandkeymgmt/asn1/base128enc.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) 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  @file 
    28  @internalComponent 
    29 */
    30 
    31 #include <e32std.h>
    32 
    33 class TASN1EncBase128DER
    34 	{
    35 public:
    36 	TASN1EncBase128DER(TUint aInt);
    37 
    38 	TUint LengthDER() const;
    39 	void WriteDERL(TDes8& aBuf, TUint& aPos) const;
    40 
    41 private:
    42 	void CalculateLengthDER();
    43 
    44 	TUint iInt;
    45 	TUint iLengthDER;
    46 	};
    47