Update contrib.
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.
15 * This file contains the implementation of the IA5 String ASN1 class.
16 * The IA5 string can contain the following characters:
17 * <character set unknown pending arrival of ITU spec>
24 EXPORT_C TASN1DecIA5String::TASN1DecIA5String(void)
29 EXPORT_C TInt TASN1DecIA5String::CheckValid(const TDesC8& /*aSource*/)
35 EXPORT_C HBufC* TASN1DecIA5String::DecodeDERL(const TASN1DecGeneric& aSource)
37 return DecodeContentsL(aSource.GetContentDER());
40 EXPORT_C HBufC* TASN1DecIA5String::DecodeDERL(const TDesC8& aSource,TInt& aPos)
43 TPtrC8 Source=aSource.Mid(aPos);
44 TASN1DecGeneric gen(Source);
46 HBufC* res = DecodeContentsL(gen.GetContentDER());
47 aPos+=gen.LengthDER();
51 HBufC* TASN1DecIA5String::DecodeContentsL(const TDesC8& aSource)
53 HBufC* res = HBufC::NewL(aSource.Length());
54 TPtr pRes = res->Des();