sl@0: /* sl@0: * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Declare TASN1EncBase128DER class. sl@0: * Declare TASN1EncBase128DER class. This encodes a given integer base 128, sl@0: * most significant digits first, with the top bit set 1 on every sl@0: * octet except the last. sl@0: * The DER encoding of numbers in base 128 is common both the the encoding sl@0: * of the tag number in high-tag-number form, and to the DER encoding of OID terms, sl@0: * hence this class to encapsulate this commonality. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: */ sl@0: sl@0: #include sl@0: sl@0: class TASN1EncBase128DER sl@0: { sl@0: public: sl@0: TASN1EncBase128DER(TUint aInt); sl@0: sl@0: TUint LengthDER() const; sl@0: void WriteDERL(TDes8& aBuf, TUint& aPos) const; sl@0: sl@0: private: sl@0: void CalculateLengthDER(); sl@0: sl@0: TUint iInt; sl@0: TUint iLengthDER; sl@0: }; sl@0: