First public contribution.
2 * Copyright (c) 1997-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.
24 EXPORT_C CWTLSRSAPublicKey* CWTLSRSAPublicKey::NewL(const TDesC8& aBinaryData)
27 return CWTLSRSAPublicKey::NewL(aBinaryData, pos);
30 EXPORT_C CWTLSRSAPublicKey* CWTLSRSAPublicKey::NewLC(const TDesC8& aBinaryData)
33 return CWTLSRSAPublicKey::NewLC(aBinaryData, pos);
36 EXPORT_C CWTLSRSAPublicKey* CWTLSRSAPublicKey::NewL(const TDesC8& aBinaryData, TInt& aPos)
38 CWTLSRSAPublicKey* self = CWTLSRSAPublicKey::NewLC(aBinaryData, aPos);
43 EXPORT_C CWTLSRSAPublicKey* CWTLSRSAPublicKey::NewLC(const TDesC8& aBinaryData, TInt& aPos)
45 CWTLSRSAPublicKey* self = new(ELeave) CWTLSRSAPublicKey;
46 CleanupStack::PushL(self);
47 self->ConstructL(aBinaryData, aPos);
52 void CWTLSRSAPublicKey::ConstructL(const TDesC8& aBinaryData, TInt& aPos)
54 TWTLSDecUnsignedInteger decInt;
55 TInt expLength = decInt.DecodeShortL(aBinaryData, aPos, 2);
56 iE = decInt.DecodeLongL(aBinaryData, aPos, expLength);
57 TInt modLength = decInt.DecodeShortL(aBinaryData, aPos, 2);
58 iN = decInt.DecodeLongL(aBinaryData, aPos, modLength);
61 CWTLSRSAPublicKey::CWTLSRSAPublicKey()