Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
45 IMPORT_C explicit TASN1DecGeneric(const TDesC8& aSource);
46 IMPORT_C void InitL();
47 IMPORT_C TPtrC8 Encoding() const;
48 IMPORT_C TInt LengthDER() const;
49 IMPORT_C TPtrC8 GetContentDER(void) const;
50 IMPORT_C TInt LengthDERContent(void) const;
51 IMPORT_C TInt LengthDERHeader() const;
52 IMPORT_C TTagType Tag() const;
53 IMPORT_C TASN1Class Class() const;
56 TInt iStartOfContents;
58 TTagType iExplicitTag;
70 IMPORT_C TASN1DecString(const TTagType aTag);
71 virtual TInt CheckValid(const TDesC8& aSource)=0;
81 IMPORT_C TASN1DecBoolean();
82 IMPORT_C TBool DecodeDERL(const TDesC8& aSource,TInt& aPos);
83 IMPORT_C TBool DecodeDERL(const TASN1DecGeneric& Source);
94 IMPORT_C TASN1DecNull();
95 IMPORT_C void DecodeDERL(const TDesC8& aSource,TInt& aPos);
96 IMPORT_C void DecodeDERL(const TASN1DecGeneric& aSource);
103 class TASN1DecEnumerated
106 IMPORT_C TASN1DecEnumerated(void);
113 class TASN1DecInteger
116 IMPORT_C TASN1DecInteger();
117 IMPORT_C TInt DecodeDERShortL(const TDesC8& aSource,TInt& aPos);
118 IMPORT_C TInt DecodeDERShortL(const TASN1DecGeneric& aSource);
119 IMPORT_C RInteger DecodeDERLongL(const TDesC8& aSource,TInt& aPos);
120 IMPORT_C RInteger DecodeDERLongL(const TASN1DecGeneric& aSource);
123 const TInt KNumberOfIDs=15;
129 class TASN1DecObjectIdentifier
132 IMPORT_C TASN1DecObjectIdentifier();
133 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
134 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& aSource);
136 TInt DecodeContentsL(TFixedArray<TInt, KNumberOfIDs>& aOID, const TDesC8& aSource);
146 IMPORT_C TASN1DecSet();
147 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* NewDERLC(const TDesC8& aSource);
148 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TDesC8& aSource,TInt& aPos);
149 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TASN1DecGeneric& aSource);
150 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TDesC8& aSource,TInt& aPos, TInt aMin, TInt aMax);
151 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TASN1DecGeneric& aSource, TInt aMin, TInt aMax);
153 /** @internalComponent */
154 void DecodeContentsL(const TDesC8& aSource, TInt& aPos, CArrayPtrFlat<TASN1DecGeneric>& aDest);
155 /** @internalComponent */
156 static void CleanupSet(TAny* aArray);
163 class TASN1DecGraphicString
166 IMPORT_C TASN1DecGraphicString();
167 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
169 IMPORT_C TInt CheckValid(const TDesC8& aSource);
171 HBufC* DecodeContentsL(const TDesC8& aSource);
178 class TASN1DecVisibleString
181 IMPORT_C TASN1DecVisibleString(void);
182 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
184 IMPORT_C TInt CheckValid(const TDesC8& aSource);
186 HBufC* DecodeContentsL(const TDesC8& aSource);
193 class TASN1DecGeneralizedTime
196 IMPORT_C TASN1DecGeneralizedTime();
197 IMPORT_C TTime DecodeDERL(const TDesC8& aSource, TInt& aPos);
198 IMPORT_C TTime DecodeDERL(const TASN1DecGeneric& aGen);
200 TTime GetTimeL(const TDesC8& aSource);
207 class TASN1DecUTCTime
210 IMPORT_C TASN1DecUTCTime();
211 IMPORT_C TTime DecodeDERL(const TASN1DecGeneric& aGen);
212 IMPORT_C TTime DecodeDERL(const TDesC8& aSource, TInt& aPos);
214 TTime GetTimeL(const TDesC8& aSource);
221 class TASN1DecBitString
224 IMPORT_C TASN1DecBitString();
225 IMPORT_C HBufC8* DecodeDERL(const TDesC8& aSource,TInt& aPos);
226 IMPORT_C HBufC8* DecodeDERL(const TASN1DecGeneric& aSource);
227 //we need the next 2 functions because many standards encode things as bit
229 IMPORT_C HBufC8* ExtractOctetStringL(const TDesC8& aSource,TInt& aPos);
230 IMPORT_C HBufC8* ExtractOctetStringL(const TASN1DecGeneric& aSource);
237 class TASN1DecIA5String
240 IMPORT_C TASN1DecIA5String();
241 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
242 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& aSource);
244 IMPORT_C TInt CheckValid(const TDesC8& aSource);
246 HBufC* DecodeContentsL(const TDesC8& aSource);
253 class TASN1DecGenericString
256 TASN1DecGenericString();
257 TInt GetContentDER(TDes8& aContent);
266 class TASN1DecUTF8String
269 IMPORT_C TASN1DecUTF8String();
270 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
271 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& aSource);
273 IMPORT_C TInt CheckValid(const TDesC8& aSource);
275 HBufC* DecodeContentsL(const TDesC8& aSource);
282 class TASN1DecGeneralString
285 IMPORT_C TASN1DecGeneralString();
286 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
288 IMPORT_C TInt CheckValid(const TDesC8& aSource);
290 HBufC* DecodeContentsL(const TDesC8& aSource);
297 class TASN1DecOctetString
300 IMPORT_C TASN1DecOctetString();
301 IMPORT_C HBufC8* DecodeDERL(const TDesC8& aSource,TInt& aPos);
302 IMPORT_C HBufC8* DecodeDERL(const TASN1DecGeneric& aSource);
304 IMPORT_C TInt CheckValid(const TDesC8& aSource);
311 class TASN1DecNumericString
314 IMPORT_C TASN1DecNumericString();
315 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
317 /** @internalComponent */
318 TInt CheckValid(const TDesC8& aSource);
320 HBufC* DecodeContentsL(const TDesC8& aSource);
327 class TASN1DecVideotexString
330 IMPORT_C TASN1DecVideotexString();
331 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
333 IMPORT_C TInt CheckValid(const TDesC8& aSource);
335 HBufC* DecodeContentsL(const TDesC8& aSource);
342 class TASN1DecPrintableString
345 IMPORT_C TASN1DecPrintableString();
346 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
347 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& aSource);
349 /** @internalComponent */
350 TInt CheckValid(const TDesC8& aSource);
352 HBufC* DecodeContentsL(const TDesC8& aSource);
356 * Class used for decoding Teletex strings.
357 * The TeletexString type is not fully supported by this library.
358 * Instead the decode methods perform a direct conversion from 8 to 16bits by adding
359 * null characters in the second byte of each character. This will work as expected
360 * for cases where the string contains ASCII data.
361 * As this is non-destructive, the original data can be retrieved by performing
362 * a Copy to an 8-bit descriptor.
366 class TASN1DecTeletexString
369 IMPORT_C TASN1DecTeletexString();
370 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
371 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& Source);
373 IMPORT_C TInt CheckValid(const TDesC8& aSource);
375 HBufC* DecodeContentsL(const TDesC8& aSource);
379 Class used for decoding ASN.1 BMP strings.
383 class TASN1DecBMPString
386 IMPORT_C TASN1DecBMPString();
387 IMPORT_C HBufC* DecodeDERL(const TDesC8& aSource,TInt& aPos);
388 IMPORT_C HBufC* DecodeDERL(const TASN1DecGeneric& aSource);
390 IMPORT_C TInt CheckValid(const TDesC8& aSource);
392 HBufC* DecodeContentsL(const TDesC8& aSource);
399 class TASN1DecSequence
402 IMPORT_C TASN1DecSequence();
403 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TDesC8& aSource,TInt& aPos);
404 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TASN1DecGeneric& aSource);
405 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TDesC8& aSource,TInt& aPos, TInt aMin, TInt aMax);
406 IMPORT_C CArrayPtrFlat<TASN1DecGeneric>* DecodeDERLC(const TASN1DecGeneric& aSource, TInt aMin, TInt aMax);
408 /** @internalComponent */
409 void DecodeContentsL(const TDesC8& aSource, CArrayPtrFlat<TASN1DecGeneric>& aDest);
410 /** @internalComponent */
411 static void CleanupSequence(TAny* aArray);