sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Declare TASN1EncBase128DER class.
|
sl@0
|
16 |
* Declare TASN1EncBase128DER class. This encodes a given integer base 128,
|
sl@0
|
17 |
* most significant digits first, with the top bit set 1 on every
|
sl@0
|
18 |
* octet except the last.
|
sl@0
|
19 |
* The DER encoding of numbers in base 128 is common both the the encoding
|
sl@0
|
20 |
* of the tag number in high-tag-number form, and to the DER encoding of OID terms,
|
sl@0
|
21 |
* hence this class to encapsulate this commonality.
|
sl@0
|
22 |
*
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
|
sl@0
|
25 |
|
sl@0
|
26 |
/**
|
sl@0
|
27 |
@file
|
sl@0
|
28 |
@internalComponent
|
sl@0
|
29 |
*/
|
sl@0
|
30 |
|
sl@0
|
31 |
#include <e32std.h>
|
sl@0
|
32 |
|
sl@0
|
33 |
class TASN1EncBase128DER
|
sl@0
|
34 |
{
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
TASN1EncBase128DER(TUint aInt);
|
sl@0
|
37 |
|
sl@0
|
38 |
TUint LengthDER() const;
|
sl@0
|
39 |
void WriteDERL(TDes8& aBuf, TUint& aPos) const;
|
sl@0
|
40 |
|
sl@0
|
41 |
private:
|
sl@0
|
42 |
void CalculateLengthDER();
|
sl@0
|
43 |
|
sl@0
|
44 |
TUint iInt;
|
sl@0
|
45 |
TUint iLengthDER;
|
sl@0
|
46 |
};
|
sl@0
|
47 |
|