void CreateL(RReadStream& aStream, CRSAPublicKey*& aOut)
	{
	RInteger N, keyPublicExp;
	CreateLC(aStream, N);
	CreateLC(aStream, keyPublicExp);

	aOut = CRSAPublicKey::NewL(N, keyPublicExp);

	CleanupStack::Pop(2, &N); // keyPublicExp, N
	}
void CreateL(RReadStream& aStream, CDSAPrivateKey*& aOut)
	{
	RInteger P, Q, G, X;
	CreateLC(aStream, P);
	CreateLC(aStream, Q);
	CreateLC(aStream, G);
	CreateLC(aStream, X);

	aOut = CDSAPrivateKey::NewL(P, Q, G, X);

	CleanupStack::Pop(4, &P);
	}
Esempio n. 3
0
sym_list *ExprGetSymList( stack_entry *entry, bool source_only )
{
    sym_list            *syms;
    void                *d;
    symbol_source       ss;

    CreateLC( entry );
    if( entry->lc->sh != NULL ) {
        ss = SS_SCOPESYM;
        d = entry->lc->sh;
        entry->lc->sh = NULL;
    } else if( entry->lc->th != NULL ) {
        ss = SS_TYPE;
        d = entry->lc->th;
        entry->lc->th = NULL;
        source_only = TRUE;
    } else {
        ss = SS_SCOPED;
        d = &entry->lc->execution;
    }
    syms = LookupSymList( ss, d, source_only, &entry->v.li );
    return( syms );
}
void CreateL(RReadStream& aStream, CRSAPrivateKey*& aOut)
	{
	RInteger privateN;
	CreateLC(aStream, privateN);
		
	TRSAPrivateKeyType keyType = EStandard;
	keyType = (TRSAPrivateKeyType)aStream.ReadInt32L();
	
	if (EStandard==keyType)
		{
		RInteger D;
		CreateLC(aStream, D);
	
		aOut = CRSAPrivateKeyStandard::NewL(privateN, D);

		CleanupStack::Pop(&D);
		}
	else if (EStandardCRT==keyType)
		{
		RInteger p, q, dP, dQ, qInv;
		CreateLC(aStream, p);
		CreateLC(aStream, q);
		CreateLC(aStream, dP);
		CreateLC(aStream, dQ);
		CreateLC(aStream, qInv);
				
		aOut = CRSAPrivateKeyCRT::NewL(privateN, p, q, dP, dQ, qInv);
		
		CleanupStack::Pop(5, &p);
		}
	else
		{
		User::Leave(KErrNotSupported);
		}

	CleanupStack::Pop(&privateN);
	}