Update contrib.
2 * Copyright (c) 2001-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 * Implementation for class encoding octet strings in ASN1 DER
22 EXPORT_C CASN1EncOctetString* CASN1EncOctetString::NewLC(const TDesC8& aStr)
24 CASN1EncOctetString* self = new (ELeave) CASN1EncOctetString();
25 CleanupStack::PushL(self);
26 self->ConstructL(aStr);
30 EXPORT_C CASN1EncOctetString* CASN1EncOctetString::NewL(const TDesC8& aStr)
32 CASN1EncOctetString* self = NewLC(aStr);
33 CleanupStack::Pop(self);
37 EXPORT_C CASN1EncOctetString::~CASN1EncOctetString()
43 CASN1EncOctetString::CASN1EncOctetString()
44 : CASN1EncPrimitive(EASN1OctetString)
49 void CASN1EncOctetString::ConstructL(const TDesC8& aStr)
51 iContents = aStr.AllocL();
52 CASN1EncPrimitive::ConstructL();
56 void CASN1EncOctetString::CalculateContentsLengthDER()
58 iContentsLengthDER = iContents->Length();
62 void CASN1EncOctetString::WriteContentsDERL(TDes8& aBuf) const
64 aBuf.Copy(*iContents);